Re: language problem in database cake1.3

2012-12-11 Thread Chris
the problem is solved,... 


On Tuesday, December 11, 2012 10:36:01 AM UTC-8, Chris wrote:
>
> anyone,...? 
> why do I see this crap in a view with cake1.3,? 
> ›Ð°Ñ ковый май- Розовый вечер  
>
> where it used to work in 1.2 
>
> thanks 
>
>
> On Monday, December 10, 2012 11:56:41 PM UTC-8, Chris wrote:
>>
>> hi guys,...
>> I'm having a problem with language in database... I'm in cake 1.3 
>> I have in app_controller: 
>>   App::import('Core', 'L10n'); 
>>   App::import('Core', 'I18n'); 
>>
>> I upload video from Youtube and have video "name" and "description" saved 
>> in database in Russina language,... but it gives me crap: 
>> ›Ð°Ñ ковый май- Розовый вечер 
>> in a view and in db... 
>>
>> link(__($video['Video']['name'], true), '/videos/show/' 
>> . $video['Video']['id']) ?>
>>
>>  how can I fix this,...  
>>
>> thanks in advance 
>> chris
>>
>>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Is overriding AppController's beforeFilter() always recommended ?

2012-12-11 Thread lowpass
Is this what you're referring to?

"Please also remember to call AppController’s callbacks within child
controller callbacks for best results"

It's just saying to call the parent callback IF you include a callback
in your controller.

On Tue, Dec 11, 2012 at 4:02 PM, alaxos  wrote:
> While answering a recent question on stackoverflow (http://
> stackoverflow.com/questions/13825073/always-call-a-function-in-
> cakephp), I discovered that it seems to be recommended in the cookbook
> to always override the AppController beforeFilter() in child
> controllers (http://book.cakephp.org/2.0/en/controllers.html#the-app-
> controller), even if it is only to call the AppController's
> beforeFilter() method like this:
>
> public function beforeFilter() {
> parent::beforeFilter();
> }
>
> My feeling is that in OO programming, this is useless, because if we
> don't override a method in a child class, the parent method is used.
>
> I do know that when the beforeFilter() method is not overridden in
> child controllers, the AppController's beforeFilter() is indeed
> called, but as it is recommended in the cookbook, is there any
> advantage to do so ? Am I missing something here ?
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Is overriding AppController's beforeFilter() always recommended ?

2012-12-11 Thread euromark
you can omit those methods if they dont do anything else except for calling 
the parent
the cookbook merely offers examples on how you would do it if you needed it

so yes, from an oop point of view, pretty useless


Am Dienstag, 11. Dezember 2012 22:02:46 UTC+1 schrieb alaxos:
>
> While answering a recent question on stackoverflow (http:// 
> stackoverflow.com/questions/13825073/always-call-a-function-in- 
> cakephp), I discovered that it seems to be recommended in the cookbook 
> to always override the AppController beforeFilter() in child 
> controllers (http://book.cakephp.org/2.0/en/controllers.html#the-app- 
> controller), even if it is only to call the AppController's 
> beforeFilter() method like this: 
>
> public function beforeFilter() { 
> parent::beforeFilter(); 
> } 
>
> My feeling is that in OO programming, this is useless, because if we 
> don't override a method in a child class, the parent method is used. 
>
> I do know that when the beforeFilter() method is not overridden in 
> child controllers, the AppController's beforeFilter() is indeed 
> called, but as it is recommended in the cookbook, is there any 
> advantage to do so ? Am I missing something here ? 
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Is overriding AppController's beforeFilter() always recommended ?

2012-12-11 Thread alaxos
While answering a recent question on stackoverflow (http://
stackoverflow.com/questions/13825073/always-call-a-function-in-
cakephp), I discovered that it seems to be recommended in the cookbook
to always override the AppController beforeFilter() in child
controllers (http://book.cakephp.org/2.0/en/controllers.html#the-app-
controller), even if it is only to call the AppController's
beforeFilter() method like this:

public function beforeFilter() {
parent::beforeFilter();
}

My feeling is that in OO programming, this is useless, because if we
don't override a method in a child class, the parent method is used.

I do know that when the beforeFilter() method is not overridden in
child controllers, the AppController's beforeFilter() is indeed
called, but as it is recommended in the cookbook, is there any
advantage to do so ? Am I missing something here ?

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: cakephp admin app

2012-12-11 Thread Jeremy Burns | Class Outfit
I just had to unwrangle an admin plugin as it (horribly - really, really 
horribly) duplicated a lot of code in the core as it couldn't reach the models. 
You might have a way around that or it might not apply, but I'd proceed with 
caution.

Jeremy Burns
Class Outfit

http://www.classoutfit.com

On 11 Dec 2012, at 16:06:57, Devario Johnson  wrote:

> Hey Jeremy, thanks again for the reply.  I no longer need the answer to this 
> as I went a different route.  
> 
> However, for the purpose of anyone who may come accross this thread trying to 
> do this same thing, Jeremy's answer is a great way to handle this "under one 
> app", but if you NEED for some reason to separate code, some people have made 
> theirs a plugin.
> 
> It was one way I found while searching on this topic, also here on this 
> group.  
> 
> Hope this helps someone. 
> 
> By far though, admin prefixes are the way to go.  
> 
> As far as the OP, it was a local dev setup thing, which would have been 
> changed to other servers when I was done etc, which I just handled with some 
> dns changes, etc 
> 
> On Tuesday, December 11, 2012 12:30:15 AM UTC-5, Jeremy Burns wrote:
> Prefix routing? 
> http://book.cakephp.org/2.0/en/development/routing.html#prefix-routing
> 
> Jeremy Burns
> Class Outfit
> 
> http://www.classoutfit.com
> 
> On 11 Dec 2012, at 00:05:47, Devario Johnson  wrote:
> 
>> So I searched a bit, and honestly I have kind of a headache right now, and 
>> can't seem to find exactly what Im looking for.  So Im hoping someone can 
>> point me in the right direction via an article or something.
>> 
>> I would like to have an admin section as a new cake app in the structure as 
>> follows
>> 
>> (my regular site)
>> is 
>> htdocs/
>> --- app/
>> everything else
>> 
>> What modifications would I have to make to allow for this to live 
>> harmoniously with that 
>> 
>> htdocs/
>> ---admin/
>> app/
>> ---everything else
>> 
>> along with (or on the side of) what is above.
>> 
>> Basically a new cake install only for the app side?
>> 
>> One way I was looking at was having both apps inside of htdocs/app1/app 
>> htdocs/admin/app, but since I already have this setup I wanted to know if I 
>> can do it the way i want without changing the structure.  Thanks
>> 
>> -- 
>> Like Us on FaceBook https://www.facebook.com/CakePHP
>> Find us on Twitter http://twitter.com/CakePHP
>>  
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "CakePHP" group.
>> To post to this group, send email to cake...@googlegroups.com.
>> To unsubscribe from this group, send email to cake-php+u...@googlegroups.com.
>> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>>  
>>  
> 
> 
> -- 
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>  
> --- 
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>  
>  

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




RE: Un-related models / functions

2012-12-11 Thread Advantage+
Thanks man :) Good looking out.

-Original Message-
From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of lowpass
Sent: Tuesday, December 11, 2012 3:35 PM
To: cake-php@googlegroups.com
Subject: Re: Un-related models / functions

keep "last"

On Tue, Dec 11, 2012 at 1:53 PM, Advantage+  wrote:
> Running nGinx on Ubuntu. No htaccess files used on nGinx.
>
> In my sites-available conf:
>
> if (!-e $request_filename) {
> rewrite ^/(.+)$ /index.php?url=$1 last;
> break;
> }
>
> So remove the ?url=$1 or ?url=$1 last ?
>
> Thanks,
>
> Dave
> -Original Message-
> From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On 
> Behalf Of lowpass
> Sent: Tuesday, December 11, 2012 3:09 PM
> To: cake-php@googlegroups.com
> Subject: Re: Un-related models / functions
>
> On Mon, Dec 10, 2012 at 2:50 PM, Advantage+  wrote:
>>
>> Forbidden
>>
>> Error: The requested address
>> '/products/feature?url=products%2Ffeature' was not found on this server.
>
> Cake throws a 404 on internal errors when debug = 0. Set debug to 2 to 
> see what the problem is.
>
>> And whats with the crazy url?
>
> It looks like you're running 2.x with 1.x mod_rewrite rules. Update 
> your webserver config or .htaccess, whichever you're using. Remove the
"?url=$1"
> part.
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP Find us on 
> Twitter http://twitter.com/CakePHP
>
> ---
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>
>
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP Find us on 
> Twitter http://twitter.com/CakePHP
>
> ---
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>
>

--
Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter
http://twitter.com/CakePHP

---
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Un-related models / functions

2012-12-11 Thread lowpass
keep "last"

On Tue, Dec 11, 2012 at 1:53 PM, Advantage+  wrote:
> Running nGinx on Ubuntu. No htaccess files used on nGinx.
>
> In my sites-available conf:
>
> if (!-e $request_filename) {
> rewrite ^/(.+)$ /index.php?url=$1 last;
> break;
> }
>
> So remove the ?url=$1 or ?url=$1 last ?
>
> Thanks,
>
> Dave
> -Original Message-
> From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
> Of lowpass
> Sent: Tuesday, December 11, 2012 3:09 PM
> To: cake-php@googlegroups.com
> Subject: Re: Un-related models / functions
>
> On Mon, Dec 10, 2012 at 2:50 PM, Advantage+  wrote:
>>
>> Forbidden
>>
>> Error: The requested address
>> '/products/feature?url=products%2Ffeature' was not found on this server.
>
> Cake throws a 404 on internal errors when debug = 0. Set debug to 2 to see
> what the problem is.
>
>> And whats with the crazy url?
>
> It looks like you're running 2.x with 1.x mod_rewrite rules. Update your
> webserver config or .htaccess, whichever you're using. Remove the "?url=$1"
> part.
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter
> http://twitter.com/CakePHP
>
> ---
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>
>
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




RE: Un-related models / functions

2012-12-11 Thread Advantage+
Running nGinx on Ubuntu. No htaccess files used on nGinx.

In my sites-available conf:

if (!-e $request_filename) {
rewrite ^/(.+)$ /index.php?url=$1 last;
break;
}

So remove the ?url=$1 or ?url=$1 last ?

Thanks,

Dave
-Original Message-
From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of lowpass
Sent: Tuesday, December 11, 2012 3:09 PM
To: cake-php@googlegroups.com
Subject: Re: Un-related models / functions

On Mon, Dec 10, 2012 at 2:50 PM, Advantage+  wrote:
>
> Forbidden
>
> Error: The requested address 
> '/products/feature?url=products%2Ffeature' was not found on this server.

Cake throws a 404 on internal errors when debug = 0. Set debug to 2 to see
what the problem is.

> And whats with the crazy url?

It looks like you're running 2.x with 1.x mod_rewrite rules. Update your
webserver config or .htaccess, whichever you're using. Remove the "?url=$1"
part.

--
Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter
http://twitter.com/CakePHP

---
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Un-related models / functions

2012-12-11 Thread lowpass
On Mon, Dec 10, 2012 at 2:50 PM, Advantage+  wrote:
>
> Forbidden
>
> Error: The requested address '/products/feature?url=products%2Ffeature' was
> not found on this server.

Cake throws a 404 on internal errors when debug = 0. Set debug to 2 to
see what the problem is.

> And whats with the crazy url?

It looks like you're running 2.x with 1.x mod_rewrite rules. Update
your webserver config or .htaccess, whichever you're using. Remove the
"?url=$1" part.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: language problem in database cake1.3

2012-12-11 Thread Chris
anyone,...? 
why do I see this crap in a view with cake1.3,? 
›Ð°Ñ ковый май- Розовый вечер  

where it used to work in 1.2 

thanks 


On Monday, December 10, 2012 11:56:41 PM UTC-8, Chris wrote:
>
> hi guys,...
> I'm having a problem with language in database... I'm in cake 1.3 
> I have in app_controller: 
>   App::import('Core', 'L10n'); 
>   App::import('Core', 'I18n'); 
>
> I upload video from Youtube and have video "name" and "description" saved 
> in database in Russina language,... but it gives me crap: 
> ›Ð°Ñ ковый май- Розовый вечер 
> in a view and in db... 
>
> link(__($video['Video']['name'], true), '/videos/show/' 
> . $video['Video']['id']) ?>
>
>  how can I fix this,...  
>
> thanks in advance 
> chris
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: What's the best way to get Twitter Bootstrap into Cake?

2012-12-11 Thread Devario Johnson
Ive used this in the past and it worked well

http://blog.loadsys.com/2012/02/14/cakephp-20-and-twitter-bootstrap/

https://github.com/loadsys/twitter-bootstrap-helper

On Thursday, December 6, 2012 3:17:53 AM UTC-5, Lourenzo Ferreira wrote:
>
> I've seen several Plugins and even forks to use Twitter's Bootstrap CSS 
> Framework with Cake.
>
> Which you would say it's the best?
>
>
> Thank you
>
> --
> Lourenzo Ferreira
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: cakephp admin app

2012-12-11 Thread Devario Johnson
Hey Jeremy, thanks again for the reply.  I no longer need the answer to 
this as I went a different route.  

However, for the purpose of anyone who may come accross this thread trying 
to do this same thing, Jeremy's answer is a great way to handle this "under 
one app", but if you NEED for some reason to separate code, some people 
have made theirs a plugin.

It was one way I found while searching on this topic, also here on this 
group.  

Hope this helps someone. 

By far though, admin prefixes are the way to go.  

As far as the OP, it was a local dev setup thing, which would have been 
changed to other servers when I was done etc, which I just handled with 
some dns changes, etc 

On Tuesday, December 11, 2012 12:30:15 AM UTC-5, Jeremy Burns wrote:
>
> Prefix routing? 
> http://book.cakephp.org/2.0/en/development/routing.html#prefix-routing
>
> Jeremy Burns
> Class Outfit
>
> http://www.classoutfit.com 
>
> On 11 Dec 2012, at 00:05:47, Devario Johnson 
> > 
> wrote:
>
> So I searched a bit, and honestly I have kind of a headache right now, and 
> can't seem to find exactly what Im looking for.  So Im hoping someone can 
> point me in the right direction via an article or something.
>
> I would like to have an admin section as a new cake app in the structure 
> as follows
>
> (my regular site)
> is 
> htdocs/
> --- app/
> everything else
>
> What modifications would I have to make to allow for this to live 
> harmoniously with that 
>
> htdocs/
> ---admin/
> app/
> ---everything else
>
> along with (or on the side of) what is above.
>
> Basically a new cake install only for the app side?
>
> One way I was looking at was having both apps inside of htdocs/app1/app 
> htdocs/admin/app, but since I already have this setup I wanted to know if I 
> can do it the way i want without changing the structure.  Thanks
>
> -- 
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>  
> --- 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake...@googlegroups.com
> .
> To unsubscribe from this group, send email to 
> cake-php+u...@googlegroups.com .
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>  
>  
>
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: cakephp admin app

2012-12-11 Thread Devario Johnson
Thanks for the reply.  That would work great if I was going to keep it all 
in the same app, however this particular situation has demanded for a 
completely separate install of cake (which I will let share the core).  

Im thinking my issue lies more in the lines of .htaccess or httpd.conf the 
more I look at it.

Basically letting 2 apps live in the same htdocs folder where app1 resolves 
to www.whatever.com and app2 resolves to www.whatever.com/admin


On Tuesday, December 11, 2012 12:30:15 AM UTC-5, Jeremy Burns wrote:
>
> Prefix routing? 
> http://book.cakephp.org/2.0/en/development/routing.html#prefix-routing
>
> Jeremy Burns
> Class Outfit
>
> http://www.classoutfit.com 
>
> On 11 Dec 2012, at 00:05:47, Devario Johnson 
> > 
> wrote:
>
> So I searched a bit, and honestly I have kind of a headache right now, and 
> can't seem to find exactly what Im looking for.  So Im hoping someone can 
> point me in the right direction via an article or something.
>
> I would like to have an admin section as a new cake app in the structure 
> as follows
>
> (my regular site)
> is 
> htdocs/
> --- app/
> everything else
>
> What modifications would I have to make to allow for this to live 
> harmoniously with that 
>
> htdocs/
> ---admin/
> app/
> ---everything else
>
> along with (or on the side of) what is above.
>
> Basically a new cake install only for the app side?
>
> One way I was looking at was having both apps inside of htdocs/app1/app 
> htdocs/admin/app, but since I already have this setup I wanted to know if I 
> can do it the way i want without changing the structure.  Thanks
>
> -- 
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>  
> --- 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake...@googlegroups.com
> .
> To unsubscribe from this group, send email to 
> cake-php+u...@googlegroups.com .
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>  
>  
>
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: What's the best way to get Twitter Bootstrap into Cake?

2012-12-11 Thread Charles Bueche
Hi,

I wish twitter bootstrap would be taken in as the default "GUI layer"
for scaffolded apps in the future, but stop dreaming now :-)

What I have done (warning, it's ugly) :

- load the cake CSS
- load the boostrap CSS
- load a custom CSS to fix what the successive load have broken.

I then have some sort of mixed look and feel. Not nice, but I can then
use bootstrap stuff.

Any better solution welcome !
Charles
> Lourenzo Ferreira 
> 6 December 2012 9:17
> I've seen several Plugins and even forks to use Twitter's Bootstrap
> CSS Framework with Cake.
>
> Which you would say it's the best?
>
>
> Thank you
>
> --
> Lourenzo Ferreira
> -- 
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>  
> ---
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>  
>  

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.


<>

Re: IIS 7, CakePHP 2.2.3 and the Blog Tutorial

2012-12-11 Thread Jorick de Lange
Hi Nutty, 

Well... As far as I'm aware of, it functions properly. In the router.php 
file I can add routes, and they are working allright. domain.com/ goes to 
the index, domain.com/controller will go to the corresponding controller, 
or via routes to the controller I've specified. 

So, it seems to function. Thanks for you help anyway. :) 

Jorick.

Op vrijdag 7 december 2012 10:09:45 UTC+1 schreef nutty het volgende:
>
> Hi Jorick,
>
> Did you resolved the issue in your index root? Mine is just working fine.
>
> Regards,
>
> On Sat, Dec 1, 2012 at 9:21 AM, Jorick de Lange 
> 
> > wrote:
>
>> Hi Nutty,
>>
>> Thanks for your link. I followed it, copy+pasted your web.config file, 
>> refreshed, but then the index (root/) isn't working. URL Rewriting is, 
>> though, 'cause I could acces '/posts/index' without a problem. 
>>
>> Thank you anyway! 
>>
>> Jorick. 
>>
>> Op zaterdag 1 december 2012 01:20:30 UTC+1 schreef nutty het volgende:
>>>
>>> I had my cakephp running in IIS and it works perfectly for me. see 
>>> http://jquerydate.blogspot.com
>>>
>>> On Sat, Dec 1, 2012 at 5:50 AM, Jorick de Lange wrote:
>>>
 Well, it makes sense to me... So, if I'm not mistaken, the system runs 
 'as it should be', right? Then I can stop bug-fixing things that aren't 
 bugs... ;-)

 Thanks,

 Jorick.

 --
 Like Us on FaceBook 
 https://www.facebook.com/**CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 You received this message because you are subscribed to the Google 
 Groups "CakePHP" group.
 To post to this group, send email to cake...@googlegroups.com.
 To unsubscribe from this group, send email to cake-php+u...@**
 googlegroups.com.

 Visit this group at 
 http://groups.google.com/**group/cake-php?hl=en
 .



>>>
>>>
>>> -- 
>>> Thanks and Best Regards,
>>> Nathaniel N. Sumaya
>>>
>>>  -- 
>> Like Us on FaceBook https://www.facebook.com/CakePHP
>> Find us on Twitter http://twitter.com/CakePHP
>>  
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "CakePHP" group.
>> To post to this group, send email to cake...@googlegroups.com
>> .
>> To unsubscribe from this group, send email to 
>> cake-php+u...@googlegroups.com .
>> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>>  
>>  
>>
>
>
>
> -- 
> Thanks and Best Regards,
> Nathaniel N. Sumaya
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




multiple templates with own path structure

2012-12-11 Thread Mathias R
Hi,

is it possible to emulate or change path structure for templates, to set 
different page structures?

i.e.
View/Themename/Controller/Action.ctp
and Layout files in View/Themename/layout.ctp

so i can set multiple templates like:

View/Tabled/Index/index.ctp with a table-structure
View/notTabled/Index/index.ctp with a div-structure

so i can change page layout anytime to another by "installing" another 
theme?
I know, that i can change layout by using another layoutfile, but i want to 
change page-view complete, that there won't be a same build structure.
i hope u understand my question, can't explain better with my terrible 
english :D

how i have to do this?

Greetings from Germany
M.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Validating multiple models in one form

2012-12-11 Thread Robert Hunt
Hi Jodator,

Thank you Jodator, I presumed I had the conventions wrong but the CakePHP 
conventions page was convulsive and difficult to piece together.

I have made the conventions changes and its validating great! :D It is 
always the little things lol

Thanks again

On Tuesday, 11 December 2012 07:00:17 UTC, jodator wrote:
>
> Why do you have $name = 'UserInfos' while your class is UserInfo (and also 
> 'Users')? Try to make it by Cake conventions and it should validate all 
> associeated models on saveAll().
>
> I would drop those lines, as they are not needed. And try changing 
> UsrInfos to UserInfo in form generation.
>
> Also:
>
>  $this->User->create();
> *// not needed:*   $this->loadModel('UserInfo');
>
> UserInfo is available in $this->User->UserInfo (whith your current belongs 
> to in $this->User->UserInfo).
>
> And:
>
>
>   'UsersInfos' => array( // why not just UserInfo ?
>'className' => 'users_infos', //Class name should be: UserInfo
>
> Also read about associations in CakePHP, your foreign keys should be 
> user_id (not users_id). It's easier to go by Cake's conventions.
>
>
>
> On Tuesday, December 11, 2012 1:08:38 AM UTC+1, Robert Hunt wrote:
>>
>> Hi All,
>>
>> I hope someone can help clear this up for me.
>>
>> Basically I have two models producing fields in a form but when saving it 
>> only validates the parent model.
>>
>> I have attempted to use saveAssociated and I have tried validating the 
>> data on a per model basis with no success.
>>
>> Here is my code:
>>
>> *User Model*
>>
>>> class User extends AppModel {
>>>  public $name = 'Users';
>>>  var $hasOne = array(
>>>   'UsersInfos' => array(
>>>'className' => 'users_infos',
>>>'foreignKey' => 'users_id'
>>>   )
>>>  );
>>>  var $hasMany = array(
>>>   'UsersIps' => array(
>>>'className' => 'users_ips',
>>>'foreignKey' => 'users_id'
>>>   ),
>>>   'UsersStats' => array(
>>>'className' => 'users_stats',
>>>'foreignKey' => 'users_id'
>>>   ),
>>>   'UsersSkills' => array(
>>>'className' => 'users_skills',
>>>'foreignKey' => 'users_id'
>>>   ),
>>>   'UsersBuildings' => array(
>>>'className' => 'users_buildings',
>>>'foreignKey' => 'users_id'
>>>   ),
>>>   'UsersItems' => array(
>>>'className' => 'users_items',
>>>'foreignKey' => 'users_id'
>>>   ),
>>>   'UsersMinerals' => array(
>>>'className' => 'users_minerals',
>>>'foreignKey' => 'users_id'
>>>   )
>>>  );
>>>  
>>>  public $validate = array(
>>>   'username' => array(
>>>'required' => array(
>>> 'rule' => array('notEmpty'),
>>> 'message' => 'Please enter a Username'
>>>),
>>>'isUnique' => array(
>>> 'rule' => array('isUnique'),
>>> 'on' => array('create'),
>>> 'message' => 'This Username is already taken, please choose another'
>>>)
>>>   ),
>>>   'password' => array(
>>>'required' => array(
>>> 'rule' => array('notEmpty'),
>>> 'message' => 'Please enter a Password'
>>>),
>>>'minLength' => array(
>>> 'rule' => array('minLength', '6'),
>>> 'message' => 'Your Password must be a minimum of 6 characters long'
>>>)
>>>   )
>>>  );
>>
>>
>> *UserInfo Model *
>>
>>> class UserInfo extends AppModel {
>>>  public $name = 'UsersInfos';
>>>  public $useTable = 'users_infos';
>>>  
>>>  public $belongsTo = array(
>>>   'Users' => array(
>>>'className' => 'Users',
>>>'foreignKey' => 'users_id'
>>>   )
>>>  );
>>>  
>>>  public $validate = array(
>>>   'first_name' => array(
>>>'required' => array(
>>> 'rule' => array('notEmpty'),
>>> 'message' => 'Please enter your First Name'
>>>)
>>>   ),
>>>   'last_name' => array(
>>>'required' => array(
>>> 'rule' => array('notEmpty'),
>>> 'message' => 'Please enter your Last Name'
>>>)
>>>   ),
>>>   'email' => array(
>>>'required' => array(
>>> 'rule' => array('notEmpty'),
>>> 'message' => 'Please enter your Email'
>>>),
>>>'email' => array(
>>> 'rule' => array('email'),
>>> 'message' => 'Please enter a valid Email'
>>>),
>>>'isUnique' => array(
>>> 'rule' => array('isUnique'),
>>> 'on' => array('create'),
>>> 'message' => 'This Email is already taken, duplicate accounts are not 
>>> allowed'
>>>)
>>>   ),
>>>   'age' => array(
>>>'required' => array(
>>> 'rule' => array('notEmpty'),
>>> 'message' => 'Please select your Age'
>>>)
>>>   ),
>>>   'sex' => array(
>>>'required' => array(
>>> 'rule' => array('notEmpty'),
>>> 'message' => 'Please select your Sex'
>>>)
>>>   ),
>>>   'location' => array(
>>>'required' => array(
>>> 'rule' => array('notEmpty'),
>>> 'message' => 'Please enter your General Location'
>>>)
>>>   ),
>>>   'race_id' => array(
>>>'required' => array(
>>> 'rule' => array('notEmpty'),
>>> 'message' => 'Please select your Race'
>>>)
>>>   )
>>>  );
>>
>>
>> *Create Account Form*
>>
>>>  echo $this->Session->flash();
>>>echo $this->Form->create('User');
>>>echo $