Re: optgroup label

2011-10-19 Thread WebbedIT
As you're after Program.name as your group value you need to contain
your Program model.

By default for recursive when using find('list') is set to -1 to be
sure to include recursive=1 too.

HTH, Paul

Reference:
http://groups.google.com/group/cake-php/browse_thread/thread/3cf1fc29ba8942bd


On Oct 18, 4:40 pm, rockbust rockb...@gmail.com wrote:
 Having trouble assigning a label to an optgroup.

 my controller
 $ranks = $this-Rankforuser-Rank-find('list',  array( 'fields' =
 array('Rank.id', 'Rank.rank_name','Rank.program_id'), 'order' =
 array('Rank.sort_id' =  'ASC') ));
 debug($ranks);
 $programs = $this-Rankforuser-Program-find('list');

 produces:
 Array
 (
     [1] = Array
         (
             [1] = White Belt
             [2] = Yellow Belt
             [4] = Green Belt
         )

     [2] = Array
         (
             [27] = White Belt
             [25] = Dragon White Belt
             [26] = Dragon Yellow Belt
         )

 )

 would like it to produce:
 Array
 (
     [taekwondo] = Array
         (
             [1] = White Belt
             [2] = Yellow Belt
             [4] = Green Belt
         )

     [kungfu] = Array
         (
             [27] = White Belt
             [25] = Dragon White Belt
             [26] = Dragon Yellow Belt
         )

 )

 my view
 echo $this-Form-input('rank_id');

 is there some way to achieve this with the database call or in the
 view with the input formatting?
 or do I need to restructure the array then pass it to the view?

-- 
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: Changing the default CakePHP footer and header

2011-10-19 Thread WebbedIT
LOL @ I haven't read all your instructions, and I'm having problems
getting it to work then now that I have read all your instructions
all is fine!

Funny how so many people treat the book the same way!?! They read a
few pages, get something working then walk away from the book and
start asking questions in here instead.

He he, Paul

On Oct 18, 3:44 pm, Yves S. Garret yoursurrogate...@gmail.com
wrote:
 Just finished reading the entire e-mail.

 Thanks, much clearer.

 On Mon, Oct 17, 2011 at 11:50 PM, Jeremy Burns | Class Outfit 







 jeremybu...@classoutfit.com wrote:
  By default, Cake uses layouts and pages located in /cake/libs/view and the
  cake.generic.ccs in /app/webroot/css (in 1.3). This is great when you have
  just fired up Cake but not sustainable when you want to upgrade your version
  of Cake (which you do by replacing the entire contents of the /cake folder).
  So you should never just rely on those files. One of the first things I
  recommend you do when starting a new app is:

  - copy /cake/libs/view/layouts/default.ctp to /app/view/layouts
  - copy /cake/libs/view/pages/home.ctp to /app/views/pages
  - rename /app/webroot/css/cake.generic.css to something more relevant
  - change the reference to the generic stylesheet in your new
  /app/views/layouts/default.ctp by changing this line: echo
  $this-Html-css('cake.generic'); to echo
  $this-Html-css('your_new_stylesheet_name');

  Now Cake will use those by default and you can change them to your heart's
  content. At first it will appear as a standard Cake app until you customise
  it.

  As its name suggests, default.ctp is the default layout. The output of your
  view (e.g. /app/views/pages/home.ctp) file will appear where the
  variable $content_for_layout appears. So you can put your own div structure,
  layout elements, custom headers/footers and whatever you choose around it.
  You can strip it all out or pimp it up. The variables $title_for_layout and
  $scripts_for_layout have their own meaning and purpose, so you should retain
  them. When you change your new css styles, the appearance will change too.
  You can happily remove the standard footer and the sql_dump (although you
  might want to place it inside a check for debug  0 so it appears in dev but
  not in production).

  Now your app lives entirely within the /app folder so updating your Cake
  version is (generally) as simple as replacing the /cake folder with the
  latest version.

  Hope that helps.

  Jeremy Burns
  Class Outfit

 http://www.classoutfit.com

  On 17 Oct 2011, at 20:07, Yves S. Garret wrote:

  Hello everyone,

     I came across this problem.  I googled it and found this solution.

 http://ask.cakephp.org/questions/view/removing_cakephp_header_footer

  And, maybe it's due to this cold/headache, but I can't make any sense of
  what's what in the entire code-tree.  It seems like changing something like
  this would make the most sense in the app directory (after all, different
  apps might use different headers and footers).  How can I specify and set
  this?  What role does $content_for_layout play in this?

  Confused as heck right now...

  --
  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 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: CakePHP 1.3 + Jquery

2011-10-19 Thread WebbedIT
  I cant find a decent tutorial (or the correct way to do it) to add
  jquery into cakephp 1.3

Are you sure you can't get this bit working?  jQuery itself gives
instructions on how to download it and include it in your page with a
script / tag.

If you choose to Cake-ify this up a bit, which most of us would
recommend, you simply use:
http://book.cakephp.org/view/1589/script

As for the rest, follow Andy's advice and get Cake working first. Only
after you're confident you know how Cake works, go to jQuery's
documentation and follow their instructions.

Too many people dive straight into jQuery (or other flavours of JS) on
their first project without getting a good enough understanding of
what Cake and jQuery actually do and end up getting themselves VERY
confused!

Paul.

-- 
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: vtiger CRM with Cakephp

2011-10-19 Thread WebbedIT
On Oct 18, 12:51 pm, zuha rich...@razorit.com wrote:
 I will after we finish the migration to CakePHP 2.0.   Otherwise we only
 share it with potential contributors who meet with me personally (phone /
 screen share).   Its in alpha phase.

But you're simply re-inventing the wheel that Fahad and Dogmatic have
already invented.  Where would we be if each member of the Cake core
team went off and developed their own versions of Cake?!?

Have you looked at Croogo and Infinitas and if you have, what has made
you decide they are not worth contributing too?

Paul

-- 
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


Pagination generatetreelist results

2011-10-19 Thread Constantin.FF
I need to paginate the results of generatetreelist together with the
Posts results.
Already I have
 $this-paginate('Post' );
but also I need the treelist of the posts. I can do this by if check
before the display of posts in the view or merging the arrays in the
controller but is there more simple and faster way for limiting the
results?

-- 
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: 2.0 upgrade shell

2011-10-19 Thread Jeremy Burns | Class Outfit
So I'm having limited/mixed results and wanted to post an update. I'm 
attempting to update a fairly complex app.

I created a blank version of 2.0, then moved my files into the right folders 
(so controllers into Controller etc) and then ran the upgrade all script.

- The shell didn't rename my view folders, so they are still lower case and 
underscored.
- PlugIns seem to be causing a few hiccups; it's complaining about DebugToolkit 
quite a bit. Have to go and see if there's a new version of it.
- I have a scattering of App::import throughout and these haven't been changed 
to App::uses, so that's a bit of work as the syntax has changed (and unless I'm 
missing something the second parameter is the location of the component/object 
I want to call, so I have to locate them first - HttpSocket for example).
- I have used Dispatcher::baseUrl() and need to find its replacement
- I'm sure there's more issues too.

All in it's done a lot for me. Building a new app in 2.0 would be OK but as 2.0 
is new and different my confidence post-upgrade is low at this point as I have 
no feel for what will still need to be changed; worried that I might miss some 
things that only cause issues way down the road (in production?). My app is not 
functioning at this time - need to spend more time and will post back later.

My thoughts right now are: version 2.0 is clearly better, but can I justify the 
time/effort/risk upgrading a 1.3 app right now?

Jeremy Burns
Class Outfit

http://www.classoutfit.com

On 19 Oct 2011, at 00:58, euromark wrote:

 after further testing it seems like upgrade locations is causing
 this
 all other subroutines are working
 but this one is finished immediately without any output and then the
 two core files are missing
 
 other things i noticed:
 - upgrade request seems only to modify app components. it should
 probably check plugin ones, too - as well as all controllers (where
 $this-data should also be changed afaik)
 - upgrade helpers dies with some missing plugin error - although the
 plugins are there. do we have to enable plugins in the bootstrap
 already in order to run this shell script?
 
 
 
 
 On 19 Okt., 01:30, euromark dereurom...@googlemail.com wrote:
 i have another question
 
 after running
 E:\...\trunk2\lib\Cake\Consolecake -app E:\...\trunk2\site upgrade
 all
 why does the shell delete itself?
 
 Console/AppShell.php
 Console/Shell.php
 are missing after that operation! very strange
 
 and it also only fixed __() and other minor stuff
 seems like no relocating took place...
 
 On 19 Okt., 00:22, #2Will willjbar...@gmail.com wrote:
 
 
 
 
 
 
 
 I did this yesterday.  Similar process - i wasn't sure how to run the
 upgrade shell,
 
 I ended up replacing the app folder with my 1.3 app, and then running
 the shell.  I don't have it in my path so instead i cd'd to my app
 folder and ran ../lib/Cake/Console/cake upgrade all
 
 which renamed a lot of folders and stuff.
 
 After that it was a lot of fixing $html  to $this-Html (yes, i know -
 shouldn't have done it like that)  and putting turnery operators
 instead of ife functions (especially in things like slug-able
 behaviours etc) and replacing file with spf.
 
 Iv'e got most of a fairly complex app running in a day.  Still got
 some ajax pagination stuff to fix tomorrow.  but all in al its not too
 difficult at all.
 
 Thanks to the team that made the migration docs, the upgrade script
 and the new 2.0 release - its all v awesome!
 
 w
 
 On Oct 19, 4:31 am, Larry E. Masters php...@gmail.com wrote:
 
 Thanks for updating your progress here. I hope this will help others as 
 they
 start migrating to 2.0. If you find anything that can help us improve the
 upgrade process at the core level let us 
 knowhttp://cakephp.lighthouseapp.com/dashboard
 
 --
 Larry E. Masters
 
 On Tue, Oct 18, 2011 at 12:27 PM, Jeremy Burns | Class Outfit 
 
 jeremybu...@classoutfit.com wrote:
 I got it to work.
 
 Firstly, I didn't have my path set up correctly. To remedy it, I changed
 the .profile file in my home directory as follows:
 
 export
 PATH=/usr/local/mysql:/user/bin:/Data/jeremyburns/Sites/CakePHP/cake:/Data/
  jeremyburns/Sites/CakePHP_2_0/lib/Cake/Console:$PATH
 
 - this being the important piece:
  :/Data/jeremyburns/Sites/CakePHP_2_0/lib/Cake/Console
 
 Then I created a new CakePHP 2.0 site and replaced the entire /app folder
 with my 1.3.13 /app folder.
 
 Then I navigated to the /app folder in Terminal and ran: cake upgrade all
 
 When I visit the new site I'm getting a few errors that I am working
 through and will post progress.
 
 Jeremy Burns
 Class Outfit
 
 http://www.classoutfit.com
 
 On 18 Oct 2011, at 17:21, rchavik wrote:
 
 I'm guessing here, but I find that having directories in app/plugins/ may
 cause the upgrade shell to give errors. Try removing the plugins in that
 directory.
 
 I have also managed to perform upgrade by renaming the app/config to
 app/Config, and implicitly load the plugins by CakePlugin::loadAll()
 

Re: 2.0 upgrade shell

2011-10-19 Thread Jeremy Burns | Class Outfit
I have also tried 'cake bake model all' and got this error:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to 
allocate 32 bytes) in 
/Volumes/Data/jeremyburns/Sites/CakePHP_2_0/lib/Cake/Model/Datasource/DboSource.php
 on line 434

Jeremy Burns
Class Outfit

Tel: +44 (0) 208 123 3822
Mob: +44 (0) 7973 481949
Skype: jeremy_burns
http://www.classoutfit.com

On 19 Oct 2011, at 08:17, Jeremy Burns | Class Outfit wrote:

 So I'm having limited/mixed results and wanted to post an update. I'm 
 attempting to update a fairly complex app.
 
 I created a blank version of 2.0, then moved my files into the right folders 
 (so controllers into Controller etc) and then ran the upgrade all script.
 
 - The shell didn't rename my view folders, so they are still lower case and 
 underscored.
 - PlugIns seem to be causing a few hiccups; it's complaining about 
 DebugToolkit quite a bit. Have to go and see if there's a new version of it.
 - I have a scattering of App::import throughout and these haven't been 
 changed to App::uses, so that's a bit of work as the syntax has changed (and 
 unless I'm missing something the second parameter is the location of the 
 component/object I want to call, so I have to locate them first - HttpSocket 
 for example).
 - I have used Dispatcher::baseUrl() and need to find its replacement
 - I'm sure there's more issues too.
 
 All in it's done a lot for me. Building a new app in 2.0 would be OK but as 
 2.0 is new and different my confidence post-upgrade is low at this point as I 
 have no feel for what will still need to be changed; worried that I might 
 miss some things that only cause issues way down the road (in production?). 
 My app is not functioning at this time - need to spend more time and will 
 post back later.
 
 My thoughts right now are: version 2.0 is clearly better, but can I justify 
 the time/effort/risk upgrading a 1.3 app right now?
 
 Jeremy Burns
 Class Outfit
 
 http://www.classoutfit.com
 
 On 19 Oct 2011, at 00:58, euromark wrote:
 
 after further testing it seems like upgrade locations is causing
 this
 all other subroutines are working
 but this one is finished immediately without any output and then the
 two core files are missing
 
 other things i noticed:
 - upgrade request seems only to modify app components. it should
 probably check plugin ones, too - as well as all controllers (where
 $this-data should also be changed afaik)
 - upgrade helpers dies with some missing plugin error - although the
 plugins are there. do we have to enable plugins in the bootstrap
 already in order to run this shell script?
 
 
 
 
 On 19 Okt., 01:30, euromark dereurom...@googlemail.com wrote:
 i have another question
 
 after running
 E:\...\trunk2\lib\Cake\Consolecake -app E:\...\trunk2\site upgrade
 all
 why does the shell delete itself?
 
 Console/AppShell.php
 Console/Shell.php
 are missing after that operation! very strange
 
 and it also only fixed __() and other minor stuff
 seems like no relocating took place...
 
 On 19 Okt., 00:22, #2Will willjbar...@gmail.com wrote:
 
 
 
 
 
 
 
 I did this yesterday.  Similar process - i wasn't sure how to run the
 upgrade shell,
 
 I ended up replacing the app folder with my 1.3 app, and then running
 the shell.  I don't have it in my path so instead i cd'd to my app
 folder and ran ../lib/Cake/Console/cake upgrade all
 
 which renamed a lot of folders and stuff.
 
 After that it was a lot of fixing $html  to $this-Html (yes, i know -
 shouldn't have done it like that)  and putting turnery operators
 instead of ife functions (especially in things like slug-able
 behaviours etc) and replacing file with spf.
 
 Iv'e got most of a fairly complex app running in a day.  Still got
 some ajax pagination stuff to fix tomorrow.  but all in al its not too
 difficult at all.
 
 Thanks to the team that made the migration docs, the upgrade script
 and the new 2.0 release - its all v awesome!
 
 w
 
 On Oct 19, 4:31 am, Larry E. Masters php...@gmail.com wrote:
 
 Thanks for updating your progress here. I hope this will help others as 
 they
 start migrating to 2.0. If you find anything that can help us improve the
 upgrade process at the core level let us 
 knowhttp://cakephp.lighthouseapp.com/dashboard
 
 --
 Larry E. Masters
 
 On Tue, Oct 18, 2011 at 12:27 PM, Jeremy Burns | Class Outfit 
 
 jeremybu...@classoutfit.com wrote:
 I got it to work.
 
 Firstly, I didn't have my path set up correctly. To remedy it, I changed
 the .profile file in my home directory as follows:
 
 export
 PATH=/usr/local/mysql:/user/bin:/Data/jeremyburns/Sites/CakePHP/cake:/Data/
  jeremyburns/Sites/CakePHP_2_0/lib/Cake/Console:$PATH
 
 - this being the important piece:
  :/Data/jeremyburns/Sites/CakePHP_2_0/lib/Cake/Console
 
 Then I created a new CakePHP 2.0 site and replaced the entire /app folder
 with my 1.3.13 /app folder.
 
 Then I navigated to the /app folder in Terminal and ran: cake upgrade all
 
 When I visit the new site I'm 

Re: redirects or exceptions?

2011-10-19 Thread euromark
if you redirect with a 301 to the index page it should be more
correct
but that probably doesnt work for all occasions

I do see your point of valid or not
although I still like the idea of the redirect as the user is less
annoyed
(sometimes the article is not yet approved or whatever and actually
exists
so a redirect with a proper message is sometimes more helpful as a
simple 404)



On 19 Okt., 06:06, Dr. Loboto drlob...@gmail.com wrote:
 From my point redirect is always bad in case of not found record.
 Without 404 status no engine will know that URL is invalid. I
 personally did redirects with 404 status on one project, but never
 thought is it valid from HTTP perspective or not. Hope that
 customization of NotFoundException allows to do anything - as 404 page
 output as custom redirect.

 On 18 ÏËÔ, 18:29, euromark dereurom...@googlemail.com wrote:







  the last years with cake = 1.3 everybody simply redirected if a
  record didnt exist

  if (!$post) {
  š š //flash message (error)
  š š $this-redirect(...) // to previous url or default index etc

  }

  the 2.0 book proposes:

  if (!$post) {
  š š š š throw new NotFoundException();

  }

  so are redirects outdated? should actions throw such exceptions if
  only the id is wrong (deleted, wrong access, ...)?
  does it hurt the usability to do so?

  of course you could still use the former approach. just wondering what
  the cons and pros are here.

-- 
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


Routes Problem

2011-10-19 Thread porangi.chris
Hi,

I'm trying to create a custom route that matches the url used by a
previous system to a new version written in cake.

Basically I have urls that are domain.com/r/i/some-name and I'd like
to match them to the categories - display action with two named
parameters id and url.   Id maybe null as its not used by the older
system but will be in this version.

This works

Router::connect(
'/r/i/*',
array('controller' = 'categories', 'action' = 'display')
);

but doesn't give me named parameters.  The following doesn't work.

Router::connect(
'/r/i/:url/:id',
array('controller' = 'categories', 'action' = 'display',
'id' = null),
array(
'id' = '[0-9]+',
'url' = '[a-zA-Z_-]'
)
);

Can someone explain what I am missing?

Thanks

Chris

-- 
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: 2.0 upgrade shell

2011-10-19 Thread majna
Yes, enable plugins in bootstrap before running upgrade sh.

-- 
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: 2.0 upgrade shell

2011-10-19 Thread majna
When upgrading plugins for each plugin add plugin option like:

cake upgrade all -p Blog

You have to upgrade App::import() manually.

-- 
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: Routes Problem

2011-10-19 Thread majna
Maybe 
Router::connectNamed(array('id', 'url')); before those routes?

-- 
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: vtiger CRM with Cakephp

2011-10-19 Thread Simon Males
On Wed, Oct 19, 2011 at 5:56 PM, WebbedIT p...@webbedit.co.uk wrote:
 On Oct 18, 12:51 pm, zuha rich...@razorit.com wrote:
 I will after we finish the migration to CakePHP 2.0.   Otherwise we only
 share it with potential contributors who meet with me personally (phone /
 screen share).   Its in alpha phase.

 But you're simply re-inventing the wheel that Fahad and Dogmatic have
 already invented.  Where would we be if each member of the Cake core
 team went off and developed their own versions of Cake?!?

 Have you looked at Croogo and Infinitas and if you have, what has made
 you decide they are not worth contributing too?

Paul / WebbedIT - I think your taking the thread down the wrong track.

The question is about CRM not CMS.

-- 
Simon Males

-- 
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 generating view for REST webservice in cakephp 2.0

2011-10-19 Thread Greg Skerman
Ok i sort of sorted it out... got rid of $xml-header, and instead of just
using $logs = $this-model-find('all'), i did $logs = array('Logs' =
$this-model-find('all') to create a root element... that worked if logs
contained 1 items.. but if it contains more than 1 item, I got the same
error...

the only thing that would get it near enough to working was $logs =
array('logs' = array('item' = $this-model-find('all'))) - which seems to
me to be needless and ridiculous?

anyone got an example of cakephp 2.0 producing index as XML using
simpleXML/rest that I can have a peak at? duplicating exactly what is in the
documentation doesn't yield any usable results

On Wed, Oct 19, 2011 at 3:25 PM, zuha rich...@razorit.com wrote:

 I doubt its the right answer but figured I'd throw it out just in case.
  Have you tried $this-Xml-header();  instead of $xml-header();  ?
 Ignore me if I'm steering you off track.

 --
 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: Login Difficulty : CakePHP 2.0

2011-10-19 Thread majna
You have Users plugin. User model is not found and Cake creates an instance 
of AppModel.
(this odd behavior enables you to query db tables without having to create 
model first.)

Make sure class User extends UsersAppModel
and configure Auth to use Users.User as model name:

$this-Auth-authenticate = array(
'Form' = array(
'userModel' = 'Users.User',
'fields' = array('username' = 'email', 'password' = 
'password'),
'scope' = array('User.active' = 1)
)
);

in AppController::beforeFilter() or elsewhere.

-- 
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 Bake Fatal Error

2011-10-19 Thread ludo monster
I'm trying to run cake bake model all but it dies.

Here's a snippet from when I try to bake the table that blows up:

code
---
Please select one of the following validation options:
---
1 - alphanumeric
2 - between
...
30 - uuid
31 - Do not do any validation on this field.
... or enter in a valid regex validation string.

[31] 
Would you like to define model associations
(hasMany, hasOne, belongsTo, etc.)? (y/n)
[y] 
One moment while the associations are detected.
---
Please confirm the following associations:
---
Game hasMany GameEffect? (y/n)
[y] 
Game hasMany GameItem? (y/n)
[y] 
Game hasMany GameMob? (y/n)
[y] 
Would you like to define some additional model associations? (y/n)
[n] 

---
The following Model will be created:
---
Name:   Game
DB Table:   `games`
Associations:
Game hasMany GameEffect
Game hasMany GameItem
Game hasMany GameMob
---
Look okay? (y/n)
[y] 

Baking model class for Game...

Creating file C:\Zend\Apache2\htdocs\Eclipse\MVCBattle\cake\app\Model
\Game.php
Wrote `C:\Zend\Apache2\htdocs\Eclipse\MVCBattle\cake\app\Model
\Game.php`
PHPUnit is not installed. Do you want to bake unit test files anyway?
(y/n)
[y] 

You can download PHPUnit from http://phpunit.de

Baking test fixture for Game...

File `C:\Zend\Apache2\htdocs\Eclipse\MVCBattle\cake\app\Test\Fixture
\GameFixture
.php` exists
Do you want to overwrite? (y/n/q)
[n] 
Skip `C:\Zend\Apache2\htdocs\Eclipse\MVCBattle\cake\app\Test\Fixture
\GameFixture
.php`

Bake is detecting possible fixtures...

Fatal error: Cannot redeclare class Game in C:\Zend\Apache2\htdocs
\Eclipse\MVCBa
ttle\cake\app\Model\Game.php on line 67

/code

Any suggestions?

-- 
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: Login Difficulty : CakePHP 2.0

2011-10-19 Thread oDiN
Have you do this ?

function beforeFilter()
{
$this-Auth-authenticate = array(
'Form' = array('userModel' = 'User')
);
}

On Oct 19, 1:21 pm, zuha rich...@razorit.com wrote:
 For some reason the UsersController after login is not finding the User
 model.  

 *// UsersController.php*

 public function login() {  
 if (!empty($this-request-data)) {
 if ($this-Auth-login()) {
 try {
 $this-User-loginMeta($this-request-data);
                  return $this-redirect($this-Auth-redirect());} catch 
 (Exception $e) {

 $this-Session-setFlash($e-getMessage());
 $this-Auth-logout();}

     } else {
         $this-Session-setFlash(__('Username or password is incorrect'),
 'default', array(), 'auth');
     }

 }
 }

 */// Error Output*

 *Notice* (8): Array to string conversion 
 [*CORE\Cake\Model\Datasource\DboSource.php*, line *436*]
 Code Context

 PDOStatement::execute() - [internal], line ??
 DboSource::_execute() - CORE\Cake\Model\Datasource\DboSource.php, line 436
 DboSource::execute() - CORE\Cake\Model\Datasource\DboSource.php, line 403
 DboSource::fetchAll() - CORE\Cake\Model\Datasource\DboSource.php, line 645
 DboSource::query() - CORE\Cake\Model\Datasource\DboSource.php, line 587
 Model::__call() - CORE\Cake\Model\Model.php, line 720
 AppModel::loginMeta() - APP\Plugin\Users\Controller\UsersController.php, line 
 48
 UsersController::login() - APP\Plugin\Users\Controller\UsersController.php, 
 line 48
 ReflectionMethod::invokeArgs() - [internal], line ??
 Controller::invokeAction() - CORE\Cake\Controller\Controller.php, line 473
 Dispatcher::_invoke() - CORE\Cake\Routing\Dispatcher.php, line 107
 Dispatcher::dispatch() - CORE\Cake\Routing\Dispatcher.php, line 89
 [main] - APP\webroot\index.php, line 125

 Notice how in that output it goes to AppModel::loginMeta()  after the
 UsersController::login()?   When my code clearly says
 : $this-User-loginMeta($this-request-data);  which is a call to the
 UserModel.   It should say UserModel::loginMeta() not
 AppModel::loginMeta().

 BTW...  I put some text in the User.php file that should throw a fatal error
 if the file is being loaded, and it does not throw the Fatal error.  
 Instead it brings me back to the login page with this output in the flash
 message.

 *SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error
 in your SQL syntax; check the manual that corresponds to your MySQL server
 version for the right syntax to use near 'loginMeta' at line 1*

-- 
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: vtiger CRM with Cakephp

2011-10-19 Thread zuha
Yes, thats why I didn't respond to it.  (not to mention I'm not on this 
board to argue with anyone)

-- 
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.0 release

2011-10-19 Thread zer0_gravity
thanks

On Oct 18, 11:19 pm, #2Will willjbar...@gmail.com wrote:
 sorry, beyond me also.  I run mamp on my apple.  Its simple and works
 and i guess it has pdo on it as it runs 2.0.  Try that.

 will

 On Oct 19, 1:42 pm, zer0_gravity zr...@hotmail.com wrote:







  You are right I don't have pdo installed on my php server. I have done
  some googling i found out it requires possibly compiling and building
  php source . I have a new probably now tried compiling and building
  php source but i broke php and now it not working. luckly I made a
  backup.

  I need a working library file (similar to the dll that came with the
  windows version of pdo php extension) for my mac x os

  I need your help please?

  specs on my mac
  Mac OS X  ver 10.5.8

  On Oct 17, 11:46 pm, #2Will willjbar...@gmail.com wrote:

   Any error messages?

   Did you rename the file to database.php?

   do you have pdo installed?

   On Oct 18, 3:15 pm, zer0_gravity zr...@hotmail.com wrote:

Hi everyone
I just install Cake 2.0.0 and I am having an issue with it. The issue
is that cakePHP is not able to connect to the database (Mysql). I
check the database config file to make sure that it is configured
properly but the strangest thing is that when I installed an older
version(1.3.13) there is no problem for cake connecting to the
database (Mysql)? What is happening here?

-- 
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: what does this mean in cakephp core source code?

2011-10-19 Thread Jeremy Burns | Class Outfit
If it is in a freshly baked project you are still using the default layouts 
that contain the adverting banner. You never run a production application using 
those defaults, so don't sweat it. It's not unreasonable for the Cake team to 
want to promote monetising services to help fnd the free software you just 
downloaded ;-)

As far as the 1px gif - I'm guessing, but that is probably some sort of click 
tracking; again, this is standard practice for many companies and not 
unreasonable.

Jeremy Burns
Class Outfit

http://www.classoutfit.com

On 19 Oct 2011, at 08:04, Azrael wrote:

 Today before I connect to internet, I started my browser and go to my new 
 local baked project and got this strange screen. Firefox can’t connect 
 tocakephp.org!
  
 It is a local project so Why should it try to connect to cakephp.org. I look 
 at source and found this  iframe :
  
 iframe src=http://cakephp.org/bake-banner; width=830 height=160 
 style=overflow:hidden; border:none;
   pFor updates and important announcements, visit http://cakefest.org/p
 /iframe
  
  
 That contain :
  
 img src=http://cakephp.org/img/banners/cakephp-training-soon-201110.png; 
 alt=CakePHP Training - Coming soon!/
  
  
 That points to a 1*1 px Gif picture!!!
  
 why a 830*160 iframe for a 1*1 Gif picture? And why placing an iframe that 
 load external content in cakephp code?
  
 I really don’t like this way of advertising in my project so would anyone 
 explain it?
  
 Screenshots:
 http://up.vatandownload.com/images/gb3futzl00qovy8s3n44.png
 http://up.vatandownload.com/images/ljayi6dl5zqv9g7lakr.png
 http://up.vatandownload.com/images/5jl79qi4rr2okzhkwc8e.png
  
 
 -- 
 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: Issue with an app not displaying properly

2011-10-19 Thread Yves S. Garret
Domain alias.

On Tue, Oct 18, 2011 at 5:07 PM, Dee Johnson devario...@gmail.com wrote:

 this is an extreme longshot but try this

 open up run and do a treacetoute from your wired system to the site, then
 do the same with the wired...

 when u access the intranet is it from domain alias or IP ?

  --
 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: what does this mean in cakephp core source code?

2011-10-19 Thread Sam Sherlock
Newly baked apps have a home.ctp file that displays some inital info.

Not certain of the details in entirely but it display recent info.

That home.ctp is something you change anyhow.

- S
On 19 Oct 2011 14:38, Azrael azrael...@gmail.com wrote:

 Today before I connect to internet, I started my browser and go to my new
 local baked project and got this strange screen. Firefox can’t connect to
 cakephp.org!

 ** **

 It is a local project so Why should it try to connect to cakephp.org. I
 look at source and found this  iframe :

 ** **

 iframe src=http://cakephp.org/bake-banner; width=830 height=160 
 style=overflow:hidden; border:none;

   pFor updates and important announcements, visit 
 http://cakefest.org/p

 /iframe

  

 ** **

 That contain :

 ** **

 img src=http://cakephp.org/img/banners/cakephp-training-soon-201110.png; 
 alt=CakePHP Training - Coming soon!/

 ** **

 ** **

 That points to a 1*1 px Gif picture!!!

 ** **

 why a 830*160 iframe for a 1*1 Gif picture? And why placing an iframe that
 load external content in cakephp code?

 ** **

 I really don’t like this way of advertising in my project so would anyone
 explain it?

 ** **

 Screenshots:

 http://up.vatandownload.com/images/gb3futzl00qovy8s3n44.png

 http://up.vatandownload.com/images/ljayi6dl5zqv9g7lakr.png

 http://up.vatandownload.com/images/5jl79qi4rr2okzhkwc8e.png

 ** **

 --
 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: 2.0 upgrade shell

2011-10-19 Thread euromark
i just wrote down a list of bugs and enhancements I found the last
couple of hours trying to port a medium to large sized app
http://cakephp.lighthouseapp.com/projects/42648-cakephp/tickets/2117-improvements-for-20-upgrade-shell



On 19 Okt., 13:32, majna majna...@gmail.com wrote:
 When upgrading plugins for each plugin add plugin option like:

     cake upgrade all -p Blog

 You have to upgrade App::import() manually.

-- 
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 Released

2011-10-19 Thread euromark
ok, wasnt the OS but the way i called the upgrade shell.
anyway - I opened a ticket regarding some enhancements/bugs

-- 
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: what does this mean in cakephp core source code?

2011-10-19 Thread AD7six


On Oct 19, 9:04 am, Azrael azrael...@gmail.com wrote:
 Today before I connect to internet, I started my browser and go to my new
 local baked project and got this strange screen. Firefox can't connect to
 cakephp.org!

 It is a local project so Why should it try to connect to cakephp.org. I look
 at source and found this  iframe :

 iframe src=http://cakephp.org/bake-banner; width=830 height=160
 style=overflow:hidden; border:none;
   pFor updates and important announcements, visithttp://cakefest.org/p
 /iframe

 That contain :

 img src=http://cakephp.org/img/banners/cakephp-training-soon-201110.png;
 alt=CakePHP Training - Coming soon!/

Oh Em Gee. Won't somebody please think of the children!


 That points to a 1*1 px Gif picture!!!

 why a 830*160 iframe for a 1*1 Gif picture?

rub your eyes and look again (load that 1 px gif and press F5, and no,
it did not just change).

 And why placing an iframe that
 load external content in cakephp code?

To be able to put relevant information on the default welcome screen
of your new, default, for your eyes only, install in no effort.


 I really don't like this way of advertising in my project so would anyone
 explain it?

It's not your project till you, you know, write some code :).

AD

-- 
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


Console Bake plugin

2011-10-19 Thread Björn Etzold
Why i can not bake model and controller for a plugin?

-- 
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: Login Difficulty : CakePHP 2.0

2011-10-19 Thread zuha
Thank you, thank you, thank you.  That worked nicely. 

-- 
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: Console Bake plugin

2011-10-19 Thread AD7six


On Oct 19, 3:52 pm, Björn Etzold bjoern.etz...@9flats.com wrote:
 Why i can not bake model and controller for a plugin?

Because you're sitting too far from the desk to reach the keyboard?

AD

-- 
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: what does this mean in cakephp core source code?

2011-10-19 Thread Jeremy Burns | Class Outfit
Hilarious as ever!

Jeremy Burns
Class Outfit

http://www.classoutfit.com

On 19 Oct 2011, at 15:06, AD7six wrote:

 
 
 On Oct 19, 9:04 am, Azrael azrael...@gmail.com wrote:
 Today before I connect to internet, I started my browser and go to my new
 local baked project and got this strange screen. Firefox can't connect to
 cakephp.org!
 
 It is a local project so Why should it try to connect to cakephp.org. I look
 at source and found this  iframe :
 
 iframe src=http://cakephp.org/bake-banner; width=830 height=160
 style=overflow:hidden; border:none;
   pFor updates and important announcements, visithttp://cakefest.org/p
 /iframe
 
 That contain :
 
 img src=http://cakephp.org/img/banners/cakephp-training-soon-201110.png;
 alt=CakePHP Training - Coming soon!/
 
 Oh Em Gee. Won't somebody please think of the children!
 
 
 That points to a 1*1 px Gif picture!!!
 
 why a 830*160 iframe for a 1*1 Gif picture?
 
 rub your eyes and look again (load that 1 px gif and press F5, and no,
 it did not just change).
 
 And why placing an iframe that
 load external content in cakephp code?
 
 To be able to put relevant information on the default welcome screen
 of your new, default, for your eyes only, install in no effort.
 
 
 I really don't like this way of advertising in my project so would anyone
 explain it?
 
 It's not your project till you, you know, write some code :).
 
 AD
 
 -- 
 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: Console Bake plugin

2011-10-19 Thread Jeremy Burns | Class Outfit
You are on form today Andy.

Jeremy Burns
Class Outfit

http://www.classoutfit.com

On 19 Oct 2011, at 14:52, Björn Etzold wrote:

 Why i can not bake model and controller for a plugin?
 
 -- 
 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 Released

2011-10-19 Thread Thomas Ploch

Forever

We should talk this over again in a billion years.

:D

On 17.10.2011 18:55, mark_story wrote:

Hey Derek,

My current plan is to continue releasing bugfix/maintenance releases
at least until 3.0 comes out.  The frequency of releases will depend
on the flow of tickets though.  Security issues will be addressed in
1.2 and 1.3 forever, despite any other maintenance release plans.

-Mark

On Oct 17, 1:40 am, DerekGardinerderek.gardi...@gmail.com  wrote:

How long with cake 1.3* be supported? We've just spent a significant
amount of time writing an application in 1.3* and would be gutted to
find out if we have to port to 2.0 already.

On Oct 16, 11:40 pm, O.J. Tibiojt...@gmail.com  wrote:








Yeah! Rave party everywhere for CakePHP 2.0! Wuzah!


--
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


Am i breaking MVC?

2011-10-19 Thread Ernesto
Hi all.

i have a simple app wich uses 2 different DBs.
The second DB is used just to import data on a daily basis, no writes.

i have 2 options:

1 - switch DB on-the-fly in my Order::import function

function import() {
$this-useDbConfig = external_db;
$this-query(SELECT * FROM blah);
$this-useDbConfig = default;
$this-saveAll(/* still to code */);
}

2 - add a new Model called Import with a different useDbConfig.

wich one is best in your opinion? i don't want to break MVC.

-- 
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: Changing the default CakePHP footer and header

2011-10-19 Thread Dee Johnson
If only I could like your comment

-- 
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: Issue with an app not displaying properly

2011-10-19 Thread Dee Johnson
did u try the bit about traceroute and trying to access it from IP instead?

-- 
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: Console Bake plugin

2011-10-19 Thread euromark
he sure is...^^

@björn
would you be so kind to provide some actual code you tried to enter
into your console?
plus the result of your communication with the bake shell - it must
have answered you somehow.
thank you so much

and please don't expect us to be magic consoles. most of us still
cannot read minds.



On 19 Okt., 16:16, Jeremy Burns | Class Outfit
jeremybu...@classoutfit.com wrote:
 You are on form today Andy.

 Jeremy Burns
 Class Outfit

 http://www.classoutfit.com

 On 19 Oct 2011, at 14:52, Björn Etzold wrote:







  Why i can not bake model and controller for a plugin?

  --
  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: Am i breaking MVC?

2011-10-19 Thread Zaky Katalan-Ezra
Why cake or php involved with this operation?

On Wed, Oct 19, 2011 at 4:52 PM, Ernesto e.fanz...@gmail.com wrote:

 Hi all.

 i have a simple app wich uses 2 different DBs.
 The second DB is used just to import data on a daily basis, no writes.

 i have 2 options:

 1 - switch DB on-the-fly in my Order::import function

 function import() {
 $this-useDbConfig = external_db;
 $this-query(SELECT * FROM blah);
 $this-useDbConfig = default;
 $this-saveAll(/* still to code */);
 }

 2 - add a new Model called Import with a different useDbConfig.

 wich one is best in your opinion? i don't want to break MVC.

  --
 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: Changing the default CakePHP footer and header

2011-10-19 Thread Yves S. Garret
:-)

You _have_ read everything I've written within context, yes?  If you have
not comprehended anything, I'll be more than happy to simplify my
explanation.

On Wed, Oct 19, 2011 at 2:44 AM, WebbedIT p...@webbedit.co.uk wrote:

 LOL @ I haven't read all your instructions, and I'm having problems
 getting it to work then now that I have read all your instructions
 all is fine!

 Funny how so many people treat the book the same way!?! They read a
 few pages, get something working then walk away from the book and
 start asking questions in here instead.

 He he, Paul

 On Oct 18, 3:44 pm, Yves S. Garret yoursurrogate...@gmail.com
 wrote:
  Just finished reading the entire e-mail.
 
  Thanks, much clearer.
 
  On Mon, Oct 17, 2011 at 11:50 PM, Jeremy Burns | Class Outfit 
 
 
 
 
 
 
 
  jeremybu...@classoutfit.com wrote:
   By default, Cake uses layouts and pages located in /cake/libs/view and
 the
   cake.generic.ccs in /app/webroot/css (in 1.3). This is great when you
 have
   just fired up Cake but not sustainable when you want to upgrade your
 version
   of Cake (which you do by replacing the entire contents of the /cake
 folder).
   So you should never just rely on those files. One of the first things I
   recommend you do when starting a new app is:
 
   - copy /cake/libs/view/layouts/default.ctp to /app/view/layouts
   - copy /cake/libs/view/pages/home.ctp to /app/views/pages
   - rename /app/webroot/css/cake.generic.css to something more relevant
   - change the reference to the generic stylesheet in your new
   /app/views/layouts/default.ctp by changing this line: echo
   $this-Html-css('cake.generic'); to echo
   $this-Html-css('your_new_stylesheet_name');
 
   Now Cake will use those by default and you can change them to your
 heart's
   content. At first it will appear as a standard Cake app until you
 customise
   it.
 
   As its name suggests, default.ctp is the default layout. The output of
 your
   view (e.g. /app/views/pages/home.ctp) file will appear where the
   variable $content_for_layout appears. So you can put your own div
 structure,
   layout elements, custom headers/footers and whatever you choose around
 it.
   You can strip it all out or pimp it up. The variables $title_for_layout
 and
   $scripts_for_layout have their own meaning and purpose, so you should
 retain
   them. When you change your new css styles, the appearance will change
 too.
   You can happily remove the standard footer and the sql_dump (although
 you
   might want to place it inside a check for debug  0 so it appears in
 dev but
   not in production).
 
   Now your app lives entirely within the /app folder so updating your
 Cake
   version is (generally) as simple as replacing the /cake folder with the
   latest version.
 
   Hope that helps.
 
   Jeremy Burns
   Class Outfit
 
  http://www.classoutfit.com
 
   On 17 Oct 2011, at 20:07, Yves S. Garret wrote:
 
   Hello everyone,
 
  I came across this problem.  I googled it and found this solution.
 
  http://ask.cakephp.org/questions/view/removing_cakephp_header_footer
 
   And, maybe it's due to this cold/headache, but I can't make any sense
 of
   what's what in the entire code-tree.  It seems like changing something
 like
   this would make the most sense in the app directory (after all,
 different
   apps might use different headers and footers).  How can I specify and
 set
   this?  What role does $content_for_layout play in this?
 
   Confused as heck right now...
 
   --
   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 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.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 

Retrieve extra field with generatetreelist

2011-10-19 Thread MetZ
Hi all.
I am wondering how I can retrieve an extra field from my rows using
generatetreelist?
$this-data = $this-Category-generatetreelist(null, null, null,
'nbsp;nbsp;nbsp;');

The field I am looking for is status, to display if the category is
active or not.

And,, btw.. I am using generatetreelist to list all nested categories
in a html table with children.
If u know of a better way to get all categories, and to put everything
in an array to output in a html table, please let me know ;)


Thanks for all and any help!
Regards!
-Tom

-- 
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: Retrieve extra field with generatetreelist

2011-10-19 Thread Dee Johnson
http://book.cakephp.org/view/1348/generatetreelist

I have not used generaltreelist personally but based on the docs above it 
seems that it works just like 'find' and if you have your relationships set 
up correctly and you set the recursive attribute to bring back the 
appropriate data you should get that

if that is not the issue then please chime back in and one of the other guys 
more familiar with it will assist im sure.

-- 
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: Console Bake plugin

2011-10-19 Thread Matthew Kaufman
LOL

On Wed, Oct 19, 2011 at 10:11 AM, AD7six andydawso...@gmail.com wrote:


 On Oct 19, 3:52 pm, Björn Etzold bjoern.etz...@9flats.com wrote:
 Why i can not bake model and controller for a plugin?

 Because you're sitting too far from the desk to reach the keyboard?

 AD

 --
 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: Console Bake plugin

2011-10-19 Thread Yves S. Garret
Bjoern, please provide some info about your issue.  The source code and the
commands you entered into your console would be of great help.

You can enter your code here:
http://bin.cakephp.org http://bin.cakephp.org/view/6396576

How can you 'be' a magic console?  How about 'being' a regular console?

:)

On Wed, Oct 19, 2011 at 11:40 AM, euromark dereurom...@googlemail.comwrote:

 he sure is...^^

 @björn
 would you be so kind to provide some actual code you tried to enter
 into your console?
 plus the result of your communication with the bake shell - it must
 have answered you somehow.
 thank you so much

 and please don't expect us to be magic consoles. most of us still
 cannot read minds.



 On 19 Okt., 16:16, Jeremy Burns | Class Outfit
 jeremybu...@classoutfit.com wrote:
  You are on form today Andy.
 
  Jeremy Burns
  Class Outfit
 
  http://www.classoutfit.com
 
  On 19 Oct 2011, at 14:52, Björn Etzold wrote:
 
 
 
 
 
 
 
   Why i can not bake model and controller for a plugin?
 
   --
   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


-- 
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: Issue with an app not displaying properly

2011-10-19 Thread Yves S. Garret
I know what the issue is.  One of the other developers entered code that
checked for certain IP addresses and let them proceed if they met the
requirements.  The wireless IP was being blocked as a result.

After I made an exception for this, it now displays just fine.  Thanks for
your help.

On Wed, Oct 19, 2011 at 11:23 AM, Dee Johnson devario...@gmail.com wrote:

 did u try the bit about traceroute and trying to access it from IP instead?

  --
 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


How can I override the method __d() ?

2011-10-19 Thread santos
How can I override the method __d() ? 

I need to put the msg of  __d() in array to use in the botton of the page. 

Where can I override this methos? in appcontroller? 

Thanks

--
View this message in context: 
http://cakephp.1045679.n5.nabble.com/How-can-I-override-the-method-d-tp4918678p4918678.html
Sent from the CakePHP mailing list archive at Nabble.com.

-- 
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: Pagination generatetreelist results

2011-10-19 Thread Constantin.FF
the issue became a bit more complicated. Here is what I need as a
result.
I have the Post Model which behave as a Tree, and also every post has
a parent or for the first level the parent is 0. Also every post has a
sort number which helps for them to be sorted.
I wold like to display paginated results but the order to be as
follows:
First to be the post with lower sort number followed by it's children
(again sorted by their sort number), next grandchildren again sorted
and so on...
Next to be the second post with its children and so on 

I'm looking for the most appropriate way to do this. If I get the
generatetreelist the results are not ordered the way I need but just
ordered by ID and also not paginated. And if I try to display the
posts results , I can sort them only by one criteria and I need them
sorted by parent_id and sort number while keeping them groped by
parent_id.

Please if someone can give an idea how to solve this. 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: CakePHP 2.0.0 release

2011-10-19 Thread mark_story
You can always use macports or homebrew to install PHP.  The default
apple PHP is janky and busted.

sudo port install php5
sudo port install php5-mysql

-Mark

On Oct 18, 10:42 pm, zer0_gravity zr...@hotmail.com wrote:
 You are right I don't have pdo installed on my php server. I have done
 some googling i found out it requires possibly compiling and building
 php source . I have a new probably now tried compiling and building
 php source but i broke php and now it not working. luckly I made a
 backup.

 I need a working library file (similar to the dll that came with the
 windows version of pdo php extension) for my mac x os

 I need your help please?

 specs on my mac
 Mac OS X  ver 10.5.8

 On Oct 17, 11:46 pm, #2Will willjbar...@gmail.com wrote:







  Any error messages?

  Did you rename the file to database.php?

  do you have pdo installed?

  On Oct 18, 3:15 pm, zer0_gravity zr...@hotmail.com wrote:

   Hi everyone
   I just install Cake 2.0.0 and I am having an issue with it. The issue
   is that cakePHP is not able to connect to the database (Mysql). I
   check the database config file to make sure that it is configured
   properly but the strangest thing is that when I installed an older
   version(1.3.13) there is no problem for cake connecting to the
   database (Mysql)? What is happening here?

-- 
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: Embedded forms, model inheritance

2011-10-19 Thread daf182
Hi,

First of all I forgot to mention that I'm using CakePhP 2.0, PHP
5.3.1, and MySQL5.1.41, and Apache 2.2.14.
Some investigation has been done.
So the validation inhereted from the parent model is working. The only
thing I had to do is to no to put the name of the parent model on the
view as I mentioned.

so just simply use:
?php echo $this-Form-create('ModelB');?
fieldset
legend?php echo __('Backadmin Add ModelB'); ?/legend
?php
echo $this-Form-input('field1FromA'); // no need to use
ModelA.field1FromA
echo $this-Form-input('field2FromA');
// etc...
echo $this-Form-input('field1FromB');
echo $this-Form-input('field2FromB');
// etc...
?
/fieldset
?php echo $this-Form-end(__('Submit'));?

This would be pretty cool, but some problem still exist. The form is
based on ModelB, and Form-input(...) function tries to figure out
which type the given field is. This works perfectly for the fields of
the given model but not its parent. It will not see the underlying
table of ModelA so eg. TINYINT(1) is not discovered well and simple
text input is showed instead of a checkbox. But, if I specify the
model in the view the checkbox appears well. (but the validation goes
away...).
I check the dump of the $object retrieved in _introspectModel() in
FormHelper.php which has type eg. ModelB. The validation part of the
dumped array seems ok, contains both rules from the child model and
from the parent model. The problem is that the useTable and table part
contain only the table used by ModelB, models_bs. If I take a closer
look at that object dump (printed by debug($object);) I found
parentClass, and parent. If it does not find the attribute in the
model and in the models joind to it (via habtm), it could look for
them in the model's parent. So this part should be corrected:
if ($key === 'fields') {
if (!isset($this-fieldset[$model]['fields'])) {
$fields = 
$this-fieldset[$model]['fields'] = $object-schema();
}
if (empty($field)) { // it's not my case now
foreach ($object-hasAndBelongsToMany 
as $alias = $assocData) {

$this-fieldset[$object-alias]['fields'][$alias] = array('type'
= 'multiple');
}
return 
$this-fieldset[$model]['fields'];
} elseif 
(isset($this-fieldset[$model]['fields'][$field])) { //
returns here in success
return 
$this-fieldset[$model]['fields'][$field];
} else {
// it returns here if the give field is not found, inhereted fields
should be handled from here
return 
isset($object-hasAndBelongsToMany[$field]) ? array('type'
= 'multiple') : null;
}
}

Hope this will help to somebody.

On okt. 18, 21:58, Gergő Nagy daf...@gmail.com wrote:
 Hi,

 I did not find any material about inheritance, and form embedding on cake
 php sites so far.
 I tried to use 
 this:http://bakery.cakephp.org/articles/santino83/2011/02/19/behavior_for_...
 but did not work perfectly.
 Basicly I use MTI (multiple table inheritance)
 I have classes ModelA extends AppModel, class ModelB extends ModelA, class
 ModelC extends ModelA and class ModelD extends AppModel.
 Let's say ModelA  belongsTo ModelD and ModelD hasMany ModelA of course.

 Tables:
 model_as(id, model_d_id, ...)
 model_bs(id, ...)
 model_cs(id, ...)
 model_ds(id, ...)

 Id fields in model_bs and model_cs are the same as in model_as. So before we
 can save a ModelB entity we have to save ModelA to have common id. This is
 handled more or less by that behavior mentioned above. (One bug exists
 related to this.)

 Is there any built in support from cake php, to support this kind of
 architecture?
 What I would need from the child entites point of view are:
 - embedding the fields of the parent model on the child's form, now I put
 them there by hand. Like ModelA.field1, ModelA.field2, etc. while form is
 created eg. with $this-Form-create('ModelB')
 - validation defined in ModelA, disapperad in the view of the child entity
 - types of the fields of the parent class are not ok, on the parent form
 they are ok, but on the a child form they aren't. Eg. booleans became simple
 textfields.
 - fields that are come via relationship of ModelA belongsTo property from
 ModelD, has to be set by hand in the controller of ModelB
 - on the update form these kind of fields (mentioned in the previous line),
 are not field well, selected element has to be set by hand

 I used the $uses = ('ModelA', 'ModelB') in the controller of ModelB.

 So is there anybody who faces these situation or is it planned to be
 supported in cake php?

-- 
Our 

Re: How can I override the method __d() ?

2011-10-19 Thread Miles J
You shouldnt override it.

Cant you just do: $var = array(__d());

Or make your own function?

function ___d() { }

On Oct 19, 10:19 am, santos dos.santos.char...@gmail.com wrote:
 How can I override the method __d() ?

 I need to put the msg of  __d() in array to use in the botton of the page.

 Where can I override this methos? in appcontroller?

 Thanks

 --
 View this message in 
 context:http://cakephp.1045679.n5.nabble.com/How-can-I-override-the-method-d-...
 Sent from the CakePHP mailing list archive at Nabble.com.

-- 
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


using App::build in cakephp 2.0 to specify a path for plugins

2011-10-19 Thread #2Will
Hello

I have added a path to my plugins paths at the top of my bootstrap
file like this:
App::build(array(
  'Plugin' = array(ROOT . '/tractor/Plugin')
  ));

and put the glorious debugKit in that folder.  I get the error below.
Can anybody help me out here?   Seems like there isn't much to go
wrong, but i have managed to make a mistake somewhere...

Fatal error: Uncaught exception 'MissingPluginException' with message
'Plugin DebugKit could not be found.' in /Users/willbarker/Dropbox/
tractor2/lib/Cake/Core/CakePlugin.php:96
Stack trace:
#0 /Users/willbarker/Dropbox/tractor2/lib/Cake/Core/
CakePlugin.php(128): CakePlugin::load('DebugKit', Array)
#1 /Users/willbarker/Dropbox/tractor2/app/Config/bootstrap.php(73):
CakePlugin::loadAll()
#2 /Users/willbarker/Dropbox/tractor2/lib/Cake/Core/Configure.php(81):
include('/Users/willbark...')
#3 /Users/willbarker/Dropbox/tractor2/lib/Cake/bootstrap.php(137):
Configure::bootstrap(true)
#4 /Users/willbarker/Dropbox/tractor2/app/webroot/index.php(77):
include('/Users/willbark...')
#5 {main} thrown in /Users/willbarker/Dropbox/tractor2/lib/Cake/Core/
CakePlugin.php on line 96


doing this:   debug(App::path('Plugin'));   gives me this:

Array
(
[0] = /Users/willbarker/Dropbox/tractor2/tractor/Plugin
[1] = /Users/willbarker/Dropbox/tractor2/app/Plugin/
[2] = /Users/willbarker/Dropbox/tractor2/app/plugins/
[3] = /Users/willbarker/Dropbox/tractor2/plugins/
)

Ive double checked it is actually in that folder.  in fact i have
looked about 15 times.

i am loading my plugins like this:

 CakePlugin::loadAll();

Thanks,

will

-- 
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


LDAP datasources

2011-10-19 Thread Chris Cinelli
In the releases notes of CakePHP 2.0 it says that cakephp 2.0 has a hook for
LDAP.
However looking at https://github.com/cakephp/datasources/tree/2.0 LDAP
datasource is listed as incompatible.
Does it mean that the LDAP datasource still needs some changes to be able to
work in CakePHP 2.0 ?
When is it going to be fixed? And if I want to fix it myself, what should I
change?

Best,
   Chris

-- 
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: LDAP datasources

2011-10-19 Thread José Lorenzo
I think you can get it working with very minor changes. It just need proper 
accessors (public, protected, private) importing the datasource class 
(App::uses('DataSource', 'Model/Datasource')) and I think that's it

give it a try!

-- 
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: Can't get Plugin model to work / be noticed at all

2011-10-19 Thread #2Will
OK, its being ignored again.  Haven't changed the code in the plugin
and have deleted the cache 18 times  even rebooted the machine.

Does anybody have any clues whats going on here?

w

On Oct 18, 6:13 pm, #2Will willjbar...@gmail.com wrote:
 Oh.  Now it works.  But no idea why, so not so much a self rescue as a
 drift to the river bank.

 I cleared some caches for about the millionth time and hay presto, the
 hasOne data shows up too.  must have accidentally lined everything up
 at last.

 ah well, on with the code.

 On Oct 18, 6:05 pm, #2Will willjbar...@gmail.com wrote:







  I upgraded to 2.0 today, which went quite smoothly, but i still have
  this problem

  the book says:  You should get a “Missing Model” error  but i don't
  at all.

  Looking in the included file list in debugkit - it is including the
  controller files for the plugin, but not the model.  I think its just
  using the automagic model creation on the fly. (at least i think cake
  does that)

  On Oct 17, 4:53 pm, #2Will willjbar...@gmail.com wrote:

   Hello

   I'm trying to make a calendar plugin for 1.3.  Its sort of working,
   but the Event model definition is being ignored and so its
   relationship to other models (in the main app) are not working.

   I guess im putting it in the wrong place, but ive gone round and round
   and round in circles and its not getting better.

   /app/plugins/calendar/models/event.php
   ?php
   class Event extends CalendarAppModel {
           var $name = 'Event';
   etc

   /app/plugins/calendar/controllers/events_controller.php

   ?php
   class EventsController extends CalendarAppController {
           var $uses = array('Calendar.Event');

   etc.

   As far as i can see that should work.  Any suggestions why it isn't or
   how to work out why it isn't working very much appreciated.  Stumped.

   will

-- 
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: using App::build in cakephp 2.0 to specify a path for plugins

2011-10-19 Thread José Lorenzo
You are missing a trailing slash in you App::build() path

-- 
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: LDAP datasources

2011-10-19 Thread Chris Cinelli
 It just need proper accessors (public, protected, private).
Can you be more specific?

Thank you

On Wed, Oct 19, 2011 at 7:40 PM, José Lorenzo jose@gmail.com wrote:

 I think you can get it working with very minor changes. It just need proper
 accessors (public, protected, private) importing the datasource class
 (App::uses('DataSource', 'Model/Datasource')) and I think that's it

 give it a try!

 --
 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.0 release

2011-10-19 Thread Ryan Schmidt
On Oct 19, 2011, at 22:23, f.f wrote:

 I got the same error [Cake is NOT able to connect to the database]
 
 and I have check the phpinfo 
 
 PDO
 PDO supportenabled
 PDO driverssqlite, sqlite2
 
 PDO_SQLITE
 PDO Driver for SQLite 3.x  enabled
 PECL Module version(bundled) 1.0.1 $Id: pdo_sqlite.c 272374 2008-12-31 
 11:17:49Z sebastian $
 SQLite Library 3.3.7

Great, you've got the PDO driver itself (which is built into PHP) and the PDO 
sqlite3 driver. But if you want to connect to a mysql database with PDO, you 
need to install the PDO mysql driver.


-- 
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.0 release

2011-10-19 Thread Andras Kende
Hello,


Look like you don't have the mysql PDO configured


Just checked my phpinfop():

PDO

PDO support enabled
PDO drivers mysql, pgsql, sqlite, sqlite2

pdo_mysql

PDO Driver for MySQLenabled
Client API version  mysqlnd 5.0.8-dev - 20102224 - $Revision: 308673 $

Directive   Local Value Master Value
pdo_mysql.default_socket/tmp/mysql.sock /tmp/mysql.sock



Andras Kende



On Oct 19, 2011, at 10:23 PM, f.f wrote:

 I got the same error [Cake is NOT able to connect to the database]
 
 and I have check the phpinfo 
 
 PDO
 PDO supportenabled
 PDO driverssqlite, sqlite2
 
 PDO_SQLITE
 PDO Driver for SQLite 3.x  enabled
 PECL Module version(bundled) 1.0.1 $Id: pdo_sqlite.c 272374 2008-12-31 
 11:17:49Z sebastian $
 SQLite Library 3.3.7
 
 
 Hope get some helps.
 
 2011/10/18 zer0_gravity zr...@hotmail.com
 Hi everyone
 I just install Cake 2.0.0 and I am having an issue with it. The issue
 is that cakePHP is not able to connect to the database (Mysql). I
 check the database config file to make sure that it is configured
 properly but the strangest thing is that when I installed an older
 version(1.3.13) there is no problem for cake connecting to the
 database (Mysql)? What is happening here?
 
 --
 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
 未命名.jpg

-- 
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.0 release

2011-10-19 Thread f.f
Thanks.

but I   use the rent server, I cannot install PDO mysql driver.

[?]

why is it cakephp 2.0.0 changed the way of connect the mysql DB.



2011/10/20 Andras Kende and...@kende.com

 Hello,


 Look like you don't have the mysql PDO configured


 Just checked my phpinfop():

 PDOPDO supportenabledPDO driversmysql, pgsql, sqlite, sqlite2
 pdo_mysqlPDO Driver for MySQLenabledClient API versionmysqlnd 5.0.8-dev -
 20102224 - $Revision: 308673 $
 DirectiveLocal ValueMaster Valuepdo_mysql.default_socket/tmp/mysql.sock
 /tmp/mysql.sock



 Andras Kende



 On Oct 19, 2011, at 10:23 PM, f.f wrote:

 I got the same error [Cake is NOT able to connect to the database]

 and I have check the phpinfo

 PDO  PDO support enabled PDO drivers sqlite, sqlite2
 PDO_SQLITE  PDO Driver for SQLite 3.x enabled PECL Module version(bundled) 
 1.0.1 $Id: pdo_sqlite.c 272374 2008-12-31
 11:17:49Z sebastian $ SQLite Library 3.3.7

 Hope get some helps.

 2011/10/18 zer0_gravity zr...@hotmail.com

 Hi everyone
 I just install Cake 2.0.0 and I am having an issue with it. The issue
 is that cakePHP is not able to connect to the database (Mysql). I
 check the database config file to make sure that it is configured
 properly but the strangest thing is that when I installed an older
 version(1.3.13) there is no problem for cake connecting to the
 database (Mysql)? What is happening here?

 --
 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
 未命名.jpg


  --
 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
33A.gif

Re: Problem generating view for REST webservice in cakephp 2.0

2011-10-19 Thread Juan Basso
Unfortunately the Xml class is not able to determine the root key and the 
child keys from a Model::find(). Model::find() return something like:

Array(
  [0] = Array(
['ModelA'] = Array( ... )
['ModelB'] = Array( ... )
  ),
  [1] = Array (...)
)

So, in this case, what is the root key? ModelA? ModelB? The Xml class cannot 
take this decision. So, you need to define, at least, the root key (in your 
case you putted array('Logs' = $findResult)). BUT, you cannot have a list 
(array with numeric keys) in the root level. Otherwise you will have tags 
like 0, 1, ... or it will try to have many root key (what is not allowed 
by XML), ie: Logs.../LogsLogs.../Logs in root level.

So, in this case, you need to have 2 levels in the array (that you used 
array('Logs' = array('item' = $findResult))). It make sense and will 
generate something like:

Logs
  item
ModelA ... /ModelA
ModelB ... /ModelB
  /item
  item
...
  /item
/Logs

That make sense to Xml class and to xml language.

You can see these informations on 
http://book.cakephp.org/2.0/en/core-utility-libraries/xml.html


Juan Basso

-- 
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.0 release

2011-10-19 Thread José Lorenzo
Can you link to your hosting provider web page? also... can you paste the 
complete phpinfo() ?

-- 
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: Am i breaking MVC?

2011-10-19 Thread Dr. Loboto
New model for this task is good way to go. Simple and clean. And
extendable easier in case if data import become more tricky then now.

On 19 окт, 21:52, Ernesto e.fanz...@gmail.com wrote:
 Hi all.

 i have a simple app wich uses 2 different DBs.
 The second DB is used just to import data on a daily basis, no writes.

 i have 2 options:

 1 - switch DB on-the-fly in my Order::import function

 function import() {
 $this-useDbConfig = external_db;
 $this-query(SELECT * FROM blah);
 $this-useDbConfig = default;
 $this-saveAll(/* still to code */);

 }

 2 - add a new Model called Import with a different useDbConfig.

 wich one is best in your opinion? i don't want to break MVC.

-- 
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: 2.0 upgrade shell

2011-10-19 Thread Vitor Pacheco
Hello, I'm trying to upgrade an application for cake2, and I am getting 
the exception MissingControllerException with the message Controller 
class Controller could not be found.


I added the folder lib to the include path.

here is my include path: 
.:/usr/share/php:/usr/share/pear:/home/vitor/Repos/cakephp2/lib


Em 19-10-2011 10:56, euromark escreveu:

i just wrote down a list of bugs and enhancements I found the last
couple of hours trying to port a medium to large sized app
http://cakephp.lighthouseapp.com/projects/42648-cakephp/tickets/2117-improvements-for-20-upgrade-shell



On 19 Okt., 13:32, majnamajna...@gmail.com  wrote:

When upgrading plugins for each plugin add plugin option like:

 cake upgrade all -p Blog

You have to upgrade App::import() manually.


--

*Vitor Pacheco*
Skype: vitor.pacheco.costa
Msn: vitor-...@hotmail.com
Cel.: 71 8626-7909
Tel.: 71 3378-5778 / 71 3287-3475

--
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


Constant mysqli warnings

2011-10-19 Thread Miles J
So my error.log is littered with all these warnings. I spent some time
going through all my code and could not locate anything wrong on my
end. Is anyone else getting these? (Before I start digging into the
Cake core). I am using 1.3.8.

2011-10-19 21:19:03 Warning: Warning (2): mysqli_get_server_info()
expects parameter 1 to be mysqli, boolean given in [/var/www/cake/cake/
libs/model/datasources/dbo/dbo_mysqli.php, line 69]
2011-10-19 21:19:03 Warning: Warning (2): mysqli_real_escape_string()
expects parameter 1 to be mysqli, boolean given in [/var/www/cake/cake/
libs/model/datasources/dbo/dbo_mysqli.php, line 195]
2011-10-19 21:19:03 Warning: Warning (2): mysqli_query() expects
parameter 1 to be mysqli, boolean given in [/var/www/cake/cake/libs/
model/datasources/dbo/dbo_mysqli.php, line 109]
2011-10-19 21:19:03 Warning: Warning (2): mysqli_errno() expects
parameter 1 to be mysqli, boolean given in [/var/www/cake/cake/libs/
model/datasources/dbo/dbo_mysqli.php, line 208]
2011-10-19 21:19:03 Warning: Warning (2): mysqli_real_escape_string()
expects parameter 1 to be mysqli, boolean given in [/var/www/cake/cake/
libs/model/datasources/dbo/dbo_mysqli.php, line 195]
2011-10-19 21:19:03 Warning: Warning (2): mysqli_real_escape_string()
expects parameter 1 to be mysqli, boolean given in [/var/www/cake/cake/
libs/model/datasources/dbo/dbo_mysqli.php, line 195]
2011-10-19 21:19:03 Warning: Warning (2): mysqli_query() expects
parameter 1 to be mysqli, boolean given in [/var/www/cake/cake/libs/
model/datasources/dbo/dbo_mysqli.php, line 109]
2011-10-19 21:19:03 Warning: Warning (2): mysqli_errno() expects
parameter 1 to be mysqli, boolean given in [/var/www/cake/cake/libs/
model/datasources/dbo/dbo_mysqli.php, line 208]
2011-10-19 21:19:03 Warning: Warning (2): mysqli_query() expects
parameter 1 to be mysqli, boolean given in [/var/www/cake/cake/libs/
model/datasources/dbo/dbo_mysqli.php, line 109]
2011-10-19 21:19:03 Warning: Warning (2): mysqli_errno() expects
parameter 1 to be mysqli, boolean given in [/var/www/cake/cake/libs/
model/datasources/dbo/dbo_mysqli.php, line 208]
2011-10-19 21:19:03 Warning: Warning (2): mysqli_query() expects
parameter 1 to be mysqli, boolean given in [/var/www/cake/cake/libs/
model/datasources/dbo/dbo_mysqli.php, line 109]
2011-10-19 21:19:03 Warning: Warning (2): mysqli_errno() expects
parameter 1 to be mysqli, boolean given in [/var/www/cake/cake/libs/
model/datasources/dbo/dbo_mysqli.php, line 208]

-- 
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