Timeline for 2.3 ?

2012-09-17 Thread NdJ
Hi CakePHP people - could not see an answer to this anywhere else - is 
there a timeline to when the 2.3 branch might be released?  Weeks or months 
at this stage?  N

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

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Packaging mechanism for CakePHP Plugins ??

2012-08-05 Thread NdJ
What is the current state (if any) for the packaging of CakePHP plugins?

We currently have (Plugins listed here http://plugins.cakephp.org/) which 
is great, but it might be even more awesome if from a cake shell (or 
similar) you could search for plugins and install (with dependency 
resolution) new plugins, much the same way as apt-get works for Debian, 
npm for Node and pear for PHP... etc etc etc.

Seems you might be able to leverage Github pulling tarballs from there 
(Terms of Service check!!) which then means all that is required is some 
kind of agreeable CakePHP package meta definition file -plus- a central 
index that can serve responses pointing to Github tarballs.

An example might be:-
$ cake packages search foobar

Which would send a query to a suitable host that stores an index of all 
registered CakePHP plugins that contain the meta definition file, that host 
would return information about all packages related to foobar.  So I might 
then type:-
$ cake packages install the-foobar-thing

Which in this case would pull the latest the-foobar-thing tarball/zipball 
package from Github, unpack it, parse the meta definition file to determine 
if there are dependencies and process any installation steps.

Thoughts, comments, problems, solutions, someone else already done or doing 
this?

N

-- 
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: Having PHP generate a PDF

2012-01-03 Thread NdJ
Hi Yves,

I've used wkhtmltoxdoc for a number of PDF generation tasks in the
past.  I'd be surprised if you can't do what you need, check it out
here:-
* http://madalgo.au.dk/~jakobt/wkhtmltoxdoc/wkhtmltopdf-0.9.9-doc.html

Cheers,
N


On Jan 3, 10:45 am, Yves S. Garret yoursurrogate...@gmail.com
wrote:
 Here is my problem. I would like to have PHP generate a PDF 8.5 x 11.
 This is the rough format of the PDF:

 http://bin.cakephp.org/view/2006656317

 But here is the kicker, say that those columns that hold data are much
 longer, say they span 2 pages. On the 2nd page, I would like to repeat the
 Header, Title 1, Title 2 and Title 3. Can this be done dynamically and
 programmatically? Does anyone have an example or a source that demonstrates
 this?

 Sample code would be very welcome :-) . A point in the right direction
 would also be very appreciated.

 This example is not CakePHP specific, but I would like some input on how to
 do this.  Any past experience that you would recommend?  Can -- what I
 described -- be done in CakePHP?

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

2011-01-21 Thread NdJ
Hi Mark - loads and loads of kudos for the ever continuing progress of
CakePHP - it's a framework I enjoy immensely.

Following on with the comments about comments for documentation:-

   Leave a comment with your thoughts on the proposed documentation changes.

  Ability to download in other formats is important, agreed.

  Does Sphinx support the ability to do the following (as we have in the
  current cookbook, but I don't see in the Python /Django docs):

  - ability for users to comment on the sections?

 I hate to say this in public, but the comments on the book have not
 been successful in my eyes.  They are filled with incorrect
 information, misleading information and content that should have been
 edits instead.

Ouch (well kinda)

User contributed comments are a double edged sword I have no doubt,
comments get made, they may be wrong and no one really has time to
monitor or catch errors and poorly crafted code suggestions.

On the flip side, user comments are routinely a valuable resource when
trying to work stuff out.  Consider what many of us do when facing a
particular problem, we Google it to see if someone out there has
already solved the given problem or something related to it.  If you
can't find a ready built piece of code you may often find hints, ideas
and techniques that set you off on your way.

Consider two examples where comments work very well and are
particularly powerful:-
* http://php.net/manual/en
* http://dev.mysql.com/doc/refman/5.5/en/

Are they perfect? No.  Are they enormously helpful, very often yes!

I doubt there is any perfect solution when it comes to API/Framework
documentation like this, but loosing an _easy_ and _central_ place to
communicate and share ideas with others about methods and functions
feels like a terrible thing to loose - it's such fertile ground...

Is there a way we can continue the search for a documentation setup
for CakePHP that includes comments?

Regards,
NdJ

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

2011-01-21 Thread NdJ
On Jan 22, 12:23 am, mark_story mark.st...@gmail.com wrote:
 On Jan 21, 7:12 am, NdJ nicholas.dej...@gmail.com wrote:

  Hi Mark - loads and loads of kudos for the ever continuing progress of
  CakePHP - it's a framework I enjoy immensely.

  Following on with the comments about comments for documentation:-

 Leave a comment with your thoughts on the proposed documentation 
 changes.

Ability to download in other formats is important, agreed.

Does Sphinx support the ability to do the following (as we have in the
current cookbook, but I don't see in the Python /Django docs):

- ability for users to comment on the sections?

   I hate to say this in public, but the comments on the book have not
   been successful in my eyes.  They are filled with incorrect
   information, misleading information and content that should have been
   edits instead.

  Ouch (well kinda)

  User contributed comments are a double edged sword I have no doubt,
  comments get made, they may be wrong and no one really has time to
  monitor or catch errors and poorly crafted code suggestions.

  On the flip side, user comments are routinely a valuable resource when
  trying to work stuff out.  Consider what many of us do when facing a
  particular problem, we Google it to see if someone out there has
  already solved the given problem or something related to it.  If you
  can't find a ready built piece of code you may often find hints, ideas
  and techniques that set you off on your way.

  Consider two examples where comments work very well and are
  particularly powerful:-
  *http://php.net/manual/en
  *http://dev.mysql.com/doc/refman/5.5/en/

  Are they perfect? No.  Are they enormously helpful, very often yes!

  I doubt there is any perfect solution when it comes to API/Framework
  documentation like this, but loosing an _easy_ and _central_ place to
  communicate and share ideas with others about methods and functions
  feels like a terrible thing to loose - it's such fertile ground...

  Is there a way we can continue the search for a documentation setup
  for CakePHP that includes comments?

  Regards,
  NdJ

 Comments are a fertile ground, and sometimes they are fertile for
 infestation of incorrect information.  Unfortunately, the large bulk
 of comments in the book are this kind.  It pains me to say that, as
 originally the hope was that they would be as useful as the comments
 on php.net.  But sadly it just never happened.  I'd also like to point

That's a real pain.  I can imagine the head-twist it puts on the
dedicated individuals who go to enormous efforts to create
documentation in the first place.  To see comments attached to their
documentation that might be wrong, misleading or perhaps even nasty is
not at all enjoyable. Not to mention the time sink. Uck!

 out that there are _numerous_ documentation sets that have no
 comments, and they seem to service their communities perfectly well.

Yes, fair enough - RubyDoc is a great example of this.  For me though,
the fact that RubyDoc does not have comments drives me crazy and I'm
forever Googling elsewhere to find people talking about stuff to
discover more information.  I'm guessing I'm not the only one doing
this (I could be wrong!)

 By we, I hope you mean you. If you feel the current suggestion is not
 up to snuff, then please suggest a better one.  Using sphinx doesn't
 occlude the possibility of using disqus for comments.  jQuery does
 this for their documentation and it works.

 -Mark

Never realized the comments at jQuery were driven with Disqus, I like
the comments setup there, it's not dis-similar than php.net or
dev.mysql.com.  So yes, implementing comments in that manner seems
like it would answer the call for comments functionality quite well.
It also follows on with the theme of outsourcing non-core effort
reducing the time sink.

My bad, using the word we in my earlier comment I did not mean to
imply ownership.

Can I suggest something better than the Disqus approach?  Probably
not.  Disqus certainly looks to be very quick to implement and shifts
the burden of feature maintenance off your plate, not sure how you
could do better.

Regards,
NdJ

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


Scaling question - separating model reads and writes across databases

2010-05-21 Thread NdJ
Hi,

I wonder if anyone out there has done the following in a production
situation that they could  provide feedback on?

/app/config/database.php:-
$read = array('host'='127.0.0.1');
$write = array('host'='1.2.3.4');

/app/app_model.php:-
beforeFind() { $this-useDbConfig = 'read'; }
beforeSave() { $this-useDbConfig = 'write'; }
beforeDelete() { $this-useDbConfig = 'write'; }

Then use database replication from the write host back to the read
host(s) thus deploying a classic master-write, multi-read database
setup.

It *seems* like this technique should work quite nicely and would
permit easy scaling but are there any CakePHP related gotchas I'm not
aware of?

Looking at the Model class source indicates the field() and read()
methods use Model-find() but if I'm not mistaken (and I could be!) I
don't believe those Model-find() calls will get passed through my
child beforeFind() callback and they could thus miss a $this-
useDbConfig adjustment. Perhaps the answer this that is to just go
ahead and overload all find, save, delete, read, field and query
methods in AppModel and insert a $this-useDbConfig statement before
passing back to their respective parents.

Anyway, has anyone got feedback or experiance doing this with CakePHP
in this way?  Did it work for you?

Cheers,
N

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Named cache config setting from views

2010-05-17 Thread NdJ
Hi,

I've bumped into some unexpected behavior when pulling cache data
using a named cache config setting from within a view.

For example:-

In core.php I have something like this:-
$cache_method = 'Apc'
Cache::config('short',array('engine'=
$cache_method,'duration'='300'));
Cache::config('medium',array('engine'=
$cache_method,'duration'='900'));
Cache::config('long',array('engine'=
$cache_method,'duration'='3600'));
Cache::config('default',array('engine'=
$cache_method,'duration'='180'));

Which works great when I use those config names for Cache::read and
Cache::write within  models and controllers.

Unfortunately when I use those Cache methods using config names within
a view I get a cache miss which when you are trying to wrap a
requestAction() is less than ideal -- I note that the object does get
written to the cache as I can see it (with APC info) but it seems
calling it back fails.

But here is the important twist -- if I use the Cache config name
'default' (our just leave it out) all works as expected.

Am I missing something special I need to do in order to cache data
within a view or is this an issue?

Ahh, and I additionally note that app/tmp/cache/views is becoming
populated with elements that I've called via $this-
element('foobar',array('cache'=array('key'='foobar','time'='+10
minutes'))) -- I was expecting to find those in the memory cache.

Cheers,
N

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Named cache config setting from views

2010-05-17 Thread NdJ
I already have a response for my own post here.

It turns out that in the Cache::read within my view I was not naming
the cache configuration, that is to say I was doing:-
$data = Cache::read('cache_name');

I've discovered that I needed to do:-
$data = Cache::read('cache_name','config_name');

When the original data was inserted into the cache with:-
Cache::write('cache_name',$data,'config_name');

I *suspect* the problem may have something to do with the fact that
within my application I'm calling Cache::read and Cache::write with
different configurations on the same request and there is some
internal Cache:: object variable that is getting set and remembered
within that request -- anyway just a guess.

Anyway the lesson is to be sure to name your cache configurations I
guess.

N


On May 18, 11:56 am, NdJ nicholas.dej...@gmail.com wrote:
 Hi,

 I've bumped into some unexpected behavior when pulling cache data
 using a named cache config setting from within a view.

 For example:-

 In core.php I have something like this:-
 $cache_method = 'Apc'
 Cache::config('short',array('engine'=
 $cache_method,'duration'='300'));
 Cache::config('medium',array('engine'=
 $cache_method,'duration'='900'));
 Cache::config('long',array('engine'=
 $cache_method,'duration'='3600'));
 Cache::config('default',array('engine'=
 $cache_method,'duration'='180'));

 Which works great when I use those config names for Cache::read and
 Cache::write within  models and controllers.

 Unfortunately when I use those Cache methods using config names within
 a view I get a cache miss which when you are trying to wrap a
 requestAction() is less than ideal -- I note that the object does get
 written to the cache as I can see it (with APC info) but it seems
 calling it back fails.

 But here is the important twist -- if I use the Cache config name
 'default' (our just leave it out) all works as expected.

 Am I missing something special I need to do in order to cache data
 within a view or is this an issue?

 Ahh, and I additionally note that app/tmp/cache/views is becoming
 populated with elements that I've called via 
 $this-element('foobar',array('cache'=array('key'='foobar','time'='+10

 minutes'))) -- I was expecting to find those in the memory cache.

 Cheers,
 N

 Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
 their CakePHP related questions.

 You received this message because you are subscribed to the Google Groups 
 CakePHP group.
 To post to this group, send email to cake-php@googlegroups.com
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group 
 athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: DebugKit

2010-04-30 Thread NdJ
Try adding Session to your controller components -- I just happened to
notice your same issue when I removed Session from my controller
components.

N


On Apr 30, 7:24 am, Ed Propsner crotchf...@gmail.com wrote:
 Could anyone tell me where I went wrong with debugkit? The installation was
 straightforward enough that it seemed impossible to screw up.

 Anyhow, it returns all the data that would be expected but it also returns a
 ton of warnings, ie:

 *Warning*: Missing argument 2 for DebugKitDebugger::_output(),

 It repeats this error for args 3, 4, 5, etc. then starts displaying notices,
 ie:

 *Notice*: Undefined variable: kontext

 It repeats this process several times over.

 Also, I can only get it work if I have debug to set on 2,
 debug 1 returns all the errors I just described and nothing else.

 Did I screw something up in Cake to make debugkit freak out or am
 I botching the installation of debugkit?

 Thanks,

 -Ed

 Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
 their CakePHP related questions.

 You received this message because you are subscribed to the Google Groups 
 CakePHP group.
 To post to this group, send email to cake-php@googlegroups.com
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group 
 athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Database connects without any queries

2010-03-30 Thread NdJ
Hi,

Recently I've noticed that CakePHP seems to cause a database connect
for each page load (when the controller uses a model) even if the page
does not perform any database query.

On the surface of things this might make sense.  My concern is that
I'm seeing database connects even when the data obtained through my
controller is clearly coming from cache.  I was not too concerned
about this until I happened to be doing some database performance work
and discovered that my database is spending most of its time dealing
with connect requests.

I've taken a quick look into the CakePHP source and there seems to be
an autoConnect parameter in the __construct() method of the DboSource
class that at least sounds like the kind of thing I want to tweak, but
I've been unable to work out how get at this properly.

Does anyone know how to stop Cake connecting to the database when it
does not need to in this case?

My setup in brief:-
* CakePHP 1.3 RC3.
* mysqli
* persistent database connections
* using the mk-query-digest tool to analyze database query performance
at the wire (very useful) - http://www.maatkit.org/doc/mk-query-digest.html

Cheers,
N

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
REMOVE ME as the subject.


Re: Database connects without any queries

2010-03-30 Thread NdJ
Hi Cricket,

Yes debug is set to zero - quite literally I get a connect followed by
a quit while the controller retrieves its data via cache.

N


On Mar 30, 10:06 pm, cricket zijn.digi...@gmail.com wrote:
 Do you have debug set to 0? Cake sends a bunch of  DESCRIBE statements
 otherwise. Is this what you're seeing?

 On Mar 30, 5:23 am, NdJ nicholas.dej...@gmail.com wrote:

  Hi,

  Recently I've noticed that CakePHP seems to cause a database connect
  for each page load (when the controller uses a model) even if the page
  does not perform any database query.

  On the surface of things this might make sense.  My concern is that
  I'm seeing database connects even when the data obtained through my
  controller is clearly coming from cache.  I was not too concerned
  about this until I happened to be doing some database performance work
  and discovered that my database is spending most of its time dealing
  with connect requests.

  I've taken a quick look into the CakePHP source and there seems to be
  an autoConnect parameter in the __construct() method of the DboSource
  class that at least sounds like the kind of thing I want to tweak, but
  I've been unable to work out how get at this properly.

  Does anyone know how to stop Cake connecting to the database when it
  does not need to in this case?

  My setup in brief:-
  * CakePHP 1.3 RC3.
  * mysqli
  * persistent database connections
  * using the mk-query-digest tool to analyze database query performance
  at the wire (very useful) -http://www.maatkit.org/doc/mk-query-digest.html

  Cheers,
  N

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
REMOVE ME as the subject.


Curious behavior in the ACL Component Acts As a Requester with Cake 1.3

2010-03-22 Thread NdJ
Hi,

I'm fairly comfortable with the CakePHP ACL mechanism even though she
can be a little tough to manage at first. I have however come by some
curious behavior using CakePHP 1.3 and the suggested Acts As a
Requester code here:-
http://book.cakephp.org/view/1547/Acts-As-a-Requester

My problem is this:-
When a new user record is created $this-data correctly contains a
value for [User][group_id] - however if you are just updating a field
within a user record $this-data will not contain any value for [User]
[group_id] and thus code suggested in the book will return a null.
This hence sets the corresponding users ARO record to have a NULL
parent_id -- ouch.

At this stage I don't know if the problem is my code or if it is a
genuine problem with the suggested code in the docs.  The example code
has been this way for quite some time so I'm finding it hard be
believe I'm the first to notice and report this.

I've resolved by adjusting the code in parentNode() in the manner
below.

Anyway, before I go ahead and attempt to adjust the online docs for a
topic that is already a challange to understand can anyone else
confirm/deny the problem I'm seeing here?  Do note that my Group
model is named UserGroup and not just Group.

Cheers,
N


/**
 * parentNode
 *
 * @return mixed
 */
function parentNode() {

if (!$this-id  empty($this-data)) {
return null;
}

if (empty($this-data) or !isset($this-data['User']
['user_group_id'])) {
$data = $this-read('user_group_id');
}
else {
$data = $this-data;
}

return array('UserGroup' = array('id' = $data['User']
['user_group_id']));
}

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
REMOVE ME as the subject.