Re: Best IDE for CakePHP 2.1

2012-04-20 Thread Kirk
i LOVE phpstorm :-)
i haven't actually set everything up for the most ideal cake experience yet
though
i've had this page bookmarked for whenever i feel like getting around to it:
http://hwarf.com/blog/2011/08/24/configure-phpstorm-to-auto-complete-cakephp-models-and-controllers/


On Thu, Apr 19, 2012 at 8:50 AM, Reza Talamkhani
wrote:

> Thanks for replies...
>
>  --
> 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 1.3.11 and 2.0.0-beta released

2011-07-26 Thread Kirk
Is there a document that outlines the major conceptual differences between
1.x and 2.x?

ie - what big changes merit a completely new version number? why is 2 better
than 1? in switching from 1 to 2, will we change the way we think, or will
things basically remain the same?

Thanks for everything!

~Kirk

On Tue, Jul 26, 2011 at 4:03 PM, José Lorenzo  wrote:

> The CakePHP core team is proud to announce the immediate availability of
> CakePHP 1.3.11 and 2.0.0-beta. 1.3.11 is a bugfix/maintenance release for
> the the 1.3 branch. 2.0.0-beta marks the beginning of API stabilization and
> means no more backwards incompatible changes should be done from this point,
> but it does not mean it is intended for production systems yet. Since the
> release CakePHP 1.3.10 in late May, there have been over 27 commits[1] and
> 10 tickets resolved. There have been a few changes that may affect your
> application:
> 1.3
>
>- Fixtures are now truncated in reverse order, this can help some
>applications with constraints in database to run tests more smoothly
>- Database credentials will now be hidden from debug output to protect
>users that forgot to set debug = 0 in their production servers
>- Fixed bug for detecting correct setup for mod_rewrite
>- Datasource will now return false instead of raising an error if
>unable to connect to Mysql or Mysqli
>- Added a banner to the default home.ctp to show important CakePHP
>announcements
>
> 2.0
>
> In the 2.0 the team has made huge strides on implementing the remaining
> items on the todo list for the next version of the framework, we had a big
> tide of new committers and lots of pull requests on github. We're thrilled
> on the interest the community is putting on CakePHP 2.0. Since 2.0.0-alpha
> there have been over 375 commits[2] with various topic branches merged in.
> There are a couple of big changes that will require you to update your app
> if already running apps in 2.0. the biggest change is in the Dispatching
> process that will require an instance on CakeResponse passed from the
> index.php webroot file. Also the default routes were extracted to their own
> file that needs to be included in your app's routes.php file, just update
> app/Config/routes.php according to the one bundled in the default
> distribution. Here is a quick list of the highlight for this release:
>
>- Microsoft SqlServer 2008 and 2011 is now a first class citizen
>- FormHelper is now able to guess model metadata again, it is now
>advisable to hint the helper with the controller $uses property of what
>models is the controller using. This contrasts with 1.3 applications where
>$uses supposed a performance hit. This is not true anymore for 2.0
>- The i18n extract shell is now able to exclude plugins from the
>process or extract one in particular
>- The validation messages in models can now be automatically extracted
>by the i18n shell, there is no need as in 1.3 applications for translating
>the messages in the constructor anymore
>- Default routes are now located in their own file that needs to be
>included in your app/Config/routes.php, make sure you update it!
>- Dispatcher now takes a CakeResponse as a second argument, make sure
>you update your app/webroot/index.php file!
>- Model::saveAll() was refactored and now the model has saveMany,
>saveAssociatied, validateMany and validateAssociated methods
>- Model::find() was refactored and the query building process is done a
>in new buildQuery() method
>- Lots of performance improvements From this point, the CakePHP core
>team will focus on fixing any bug that pops out on the lighthouse[3] and
>finish the new 2.0 book[4] which is now git based and compiled using 
> sphinx.
>If you feel like you can give us a hand on getting an excellent
>documentation, please feel free to fork the repo and send us pull request
>for changes. We are also looking forward improving our API documentation, 
> so
>pull requests for doc blocks in code are also very welcome!
>
> As CakeFest 2011[5] is near we're encouraging developers to buy tickets
> before the early bird prices are over. We'll have a bunch of surprises to
> show in Manchester this September including certificates for attendees to
> the training workshops, two tracks for talks, lots of international
> speakers, and much more. Make sure you know the schedule[6] if you have not
> yet made up your mind!
>
> A huge thanks to all involved in terms of both contributions through
> commits, tickets, documentation edits, and otherwise contribute to the
> framework. Without you there would be no CakePHP.
> Links
>
>- [1] http://

Re: CakeFest 2010 - Last chance for cheap tickets!

2010-07-23 Thread Kirk
Free iPad?! It sounds like spam but it's not! :-)

On Fri, Jul 23, 2010 at 1:40 PM, mike karthauser wrote:

> hi graham
> on the cakefest site it says 1st of august for the end of the early bird
> tickets.
>
> http://cakefest.org/ticket-info
>
> seems a bit cruel having cut off today when its it looks like theres
> another week?
>
> btw whats the prices going up to?
>
> mikek
>
>
>
> On 23 Jul 2010, at 17:50, Graham Weldon wrote:
>
> Just a reminder that today is the last day of Early Bird ticket sales
> for the CakeFest 2010 conference.
> If you want to take advantage of these prices, you need to purchase
> your tickets today!
>
> If anyone has any questions about the event or needs some more
> information about ticket purchase, please feel free to contact me via:
> cakef...@cakephp.org
> Don't leave buying your tickets too late!
>
>
> Cheers,
> Graham Weldon (AKA: Predominant)
>
>
>
>
> On Jul 21, 5:47 pm, Graham Weldon  wrote:
>
> 
>
> The End is Nigh! (for early-bird ticket pricing)
>
> CakeFesthas always offered cheaper tickets for those
> that purchase as
>
> early as possible.
>
>
> This year, the early bird ticketing finishes on the 24th July.
>
>
> Following the 24th, ticket prices will be raising to cover the
>
> additional logistical cost, and passthrough cost for event management
>
> and venue booking to cover attendees. This is a perfect opportunity to
>
> take advantage of the cheaper prices before they raise on July 25th.
>
>
> For more information on ticketing and pricing, please visit the ticket
>
> information page. Note that accommodation options offered position you
>
> at the same venue as the core developers and the event itself,
>
> ensuring the most cost effective price and the bestCakeFest
>
> conference experience available!
>
>
> If you have any questions regarding tickets, accommodation, pricing or
>
> anything else, please feel free to contact us for more information.
>
>
> View the full schedule here:http://cakefest.org/schedule
>
>
> 
>
> Score a free iPad
>
> 
>
>
> Recently leaked information was cropping up on Twitter announcing that
>
> we are giving away an iPad atCakeFest.
>
>
> While we had hoped to keep this information under wraps until the
>
> event was underway, however we are required to address to
> rumours.CakeFest2010 will indeed involve the giveaway of an Apple iPad
>
> device. This will be a random pool from the attendee! Thats right,
>
> just by having purchased a ticket, you will be eligible to win an
>
> Apple iPad on the conference days.
>
>
> The winner is required to be onsite at the announcement to collect the
>
> iPad, or another winner will be randomly selected from the pool of
>
> attendees.
>
>
> Ticket information:http://cakefest.org/ticket-info
>
>
> Purchase tickets from your account dashboard:http://cakefest.org/profile
>
>
> If you have any questions, or want some information about theCakeFest
>
> event, or sponsorship, please drop me an email!
>
>
> Cheers,
>
> Graham Weldon (AKA: Predominant)
>
>
> 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.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>
>
> --
> Mike Karthäuser
> Managing Director - Brightstorm Ltd
> Email: mi...@brightstorm.co.uk
> Web: http://www.brightstorm.co.uk
> Tel: 07939 252144
> Address: 1 Brewery Court, North Street, Bristol, BS3 1JS
>
>  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.comFor
>  more options, visit this group at
> http://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: ACL problem

2010-07-22 Thread Kirk
i don't know, but this guy said don't use acl for non-record-level
permissions:
http://groups.google.com/group/cake-php/msg/581096ef10896eea

On Thu, Jul 22, 2010 at 7:02 AM, Ambika Kulkarni  wrote:

>
> I am not understanding how to use aros table...
>
> how to add data in acos, aros and aros_acos table.
>
> Do I need to create model for these 3 tables.
>
> Please some body reply
>
>
> On Jul 22, 3:10 pm, Ambika Kulkarni 
> wrote:
> > Hi Folks,
> >
> > This is the first that I am working on ACL, so I facing lot of
> > problems with ACL. I followed cakephp tutorial and did the way as it
> > is mentioned in the tutorial. Now when i login I am not able to access
> > to any of my controller. As it is giving me following error
> >
> > Warning (512): AclNode::node() - Couldn't find Aro node identified by
> > "Array
> > (
> > [Aro0.model] => User
> > [Aro0.foreign_key] => 997
> > )
> > " [CORE/cake/libs/model/db_acl.php, line 191]
> >
> > Code | Context
> >
> > $this   =   Aro
> > Aro::$name = "Aro"
> > Aro::$hasAndBelongsToMany = array
> > Aro::$cacheQueries = false
> > Aro::$actsAs = array
> > Aro::$useDbConfig = "default"
> > Aro::$useTable = "aros"
> > Aro::$displayField = "id"
> > Aro::$id = false
> > Aro::$data = array
> > Aro::$table = "aros"
> > Aro::$primaryKey = "id"
> > Aro::$_schema = array
> > Aro::$validate = array
> > Aro::$validationErrors = array
> > Aro::$tablePrefix = ""
> > Aro::$alias = "Aro"
> > Aro::$tableToModel = array
> > Aro::$logTransactions = false
> > Aro::$transactional = false
> > Aro::$belongsTo = array
> > Aro::$hasOne = array
> > Aro::$hasMany = array
> > Aro::$Behaviors = BehaviorCollection object
> > Aro::$whitelist = array
> > Aro::$cacheSources = true
> > Aro::$findQueryType = NULL
> > Aro::$recursive = 1
> > Aro::$order = NULL
> > Aro::$__exists = NULL
> > Aro::$__associationKeys = array
> > Aro::$__associations = array
> > Aro::$__backAssociation = array
> > Aro::$__insertID = NULL
> > Aro::$__numRows = NULL
> > Aro::$__affectedRows = NULL
> > Aro::$_findMethods = array
> > Aro::$_log = NULL
> > Aro::$Aco = Aco object
> > Aro::$Permission = Permission object
> > $ref=   array(
> > "Aro0.model" => "User",
> > "Aro0.foreign_key" => "997"
> > )
> > $db =   DboMysql
> > DboMysql::$description = "MySQL DBO Driver"
> > DboMysql::$_baseConfig = array
> > DboMysql::$startQuote = "`"
> > DboMysql::$endQuote = "`"
> > DboMysql::$_useAlias = true
> > DboMysql::$_commands = array
> > DboMysql::$columns = array
> > DboMysql::$index = array
> > DboMysql::$alias = "AS "
> > DboMysql::$fieldCache = array
> > DboMysql::$__bypass = true
> > DboMysql::$__sqlOps = array
> > DboMysql::$connected = true
> > DboMysql::$fullDebug = false
> > DboMysql::$error = NULL
> > DboMysql::$affected = 0
> > DboMysql::$numRows = 0
> > DboMysql::$took = 0
> > DboMysql::$_result = resource
> > DboMysql::$_queriesCnt = 0
> > DboMysql::$_queriesTime = NULL
> > DboMysql::$_queriesLog = array
> > DboMysql::$_queriesLogMax = 200
> > DboMysql::$_queryCache = array
> > DboMysql::$__descriptions = array
> > DboMysql::$_sources = array
> > DboMysql::$connection = resource
> > DboMysql::$config = array
> > DboMysql::$configKeyName = "default"
> > DboMysql::$_transactionStarted = false
> > DboMysql::$cacheSources = true
> > DboMysql::$_log = NULL
> > DboMysql::$results = resource
> > DboMysql::$map = array
> > DboMysql::$__booleans = array
> > $type   =   "Aro"
> > $result =   array()
> > $table  =   "aros"
> > $name   =   "User"
> > $model  =   User
> > User::$name = "User"
> > User::$primaryKey = "user_id"
> > User::$belongsTo = array
> > User::$actsAs = array
> > User::$validate = array
> > User::$useDbConfig = "default"
> > User::$useTable = "users"
> > User::$displayField = "title"
> > User::$id = false
> > User::$data = array
> > User::$table = "users"
> > User::$_schema = array
> > User::$validationErrors = array
> > User::$tablePrefix = ""
> > User::$alias = "User"
> > User::$tableToModel = array
> > User::$logTransactions = false
> > User::$transactional = false
> > User::$cacheQueries = false
> > User::$hasOne = array
> > User::$hasMany = array
> > User::$hasAndBelongsToMany = array
> > User::$Behaviors = BehaviorCollection object
> > User::$whitelist = array
> > User::$cacheSources = true
> > User::$findQueryType = NULL
> > User::$recursive = 1
> > User::$order = NULL
> > User::$__exists = NULL
> > User::$__associationKeys = array
> > User::$__associations = array
> > User::$__backAssociation = array
> > User::$__insertID = NULL
> > User::$__numRows = NULL
> > User::$__affectedRows = NULL
> > User::$_findMethods = array
> > User::$_log = NULL
> > User::$Group = Group object
> > User::$Aro = Aro object
> > $tmpRef =   null
> > $val=   "997"
> > $key=   "foreign_key"
> > $queryData  =   array(
> > "conditions" => array(
> > "Aro0.model" => "User",
> > "Aro0.foreign_key" => "997"
> > ),
> >

Re: let users 'edit' database

2010-07-22 Thread Kirk
it could be implemented as a behavior. beforeSave callback would be used for
changes that need approval. afterSave callback would be used for revision
history. for revisions, it would work really well if everything had a uuid
instead of auto-inc id, but it could also work with auto-inc id like the
cake comments/tags plugins, which have a field for id and a field for model.
the drupal method would be great for frequent access to revisions, but
without such a need, i imagine it would eventually become a performance
drain with so many unnecessary rows (could be negligible). an advantage of
the serialized version is that it could be implemented without changing any
of the existing tables, and you could set arbitrary revisions (like
"restore" points, forgive the microsoft reference).

On Thu, Jul 22, 2010 at 10:49 AM, mattmoy...@gmail.com  wrote:

> great idea kirk, that would be a great start to a revisions component
> in cake
>
> On Jul 21, 5:17 pm, Kirk  wrote:
> > Some guy submitted a "multiple undo" type thing to the bakery. I thought
> it
> > was kinda clunky, but it gave me an idea for an improvement, which could
> > also be applied to your situation. Create a table for pending changes,
> and
> > save all submitted changes to that table in serialized form. Then you can
> > just unserialize and save to the actual db.
> >
> > http://php.net/manual/en/function.serialize.php
> >
> > <http://php.net/manual/en/function.serialize.php>The fields could be
> > something like:
> >
> > id (auto-increment)
> > change_data (serialized array)
> > url (original url change was submitted to, eg - "posts/save/24")
> >
> > On Wed, Jul 21, 2010 at 4:43 PM, Jay  wrote:
> > > so a database revision/version control module is not available for
> > > cakephp? =(
> >
> > > On Jul 20, 10:54 am, "mattmoy...@gmail.com" 
> > > wrote:
> > > > Drupal does something like this called revisions.  You could
> implement
> > > > a much simpler version of this in your application by adding 2
> columns
> > > > to your database called revision and display.  Revision would just be
> > > > a revision number and you could use a timestamp as the field so it
> > > > would be unique and also keep track of creation time.  The display
> > > > column would just be a boolean showing which revision to show.  Then
> > > > you would implement some revision control actions in your controller
> > > > to manage the revisions.
> >
> > > > This would actually be awesome if generalized and written as a
> > > > behavior.  Unfortunately, I just don't have the time right now. :(
> >
> > > > On Jul 19, 6:01 pm, Jay  wrote:
> >
> > > > > ok guys, so here is the situation:
> >
> > > > > - we have built up a website using cakephp and it contains several
> > > > > models.
> > > > > - we want some users to be able to "make changes" to the database
> via
> > > > > webpage
> > > > > - but we want to audit the changes before they are actual made to
> the
> > > > > database
> >
> > > > > Our problem is, how do we know what the user changed if those
> changes
> > > > > are not "saved" the first time around. We are thinking of
> displaying a
> > > > > mock database and have the admin merge it with the real db. Is
> there
> > > > > any other way to tackle this?
> > > > > Thanks for all your inputs.
> >
> > > 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 at
> > >http://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.comFor
>  more options, visit this group at
> http://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: let users 'edit' database

2010-07-21 Thread Kirk
Some guy submitted a "multiple undo" type thing to the bakery. I thought it
was kinda clunky, but it gave me an idea for an improvement, which could
also be applied to your situation. Create a table for pending changes, and
save all submitted changes to that table in serialized form. Then you can
just unserialize and save to the actual db.

http://php.net/manual/en/function.serialize.php

The fields could be
something like:

id (auto-increment)
change_data (serialized array)
url (original url change was submitted to, eg - "posts/save/24")

On Wed, Jul 21, 2010 at 4:43 PM, Jay  wrote:

> so a database revision/version control module is not available for
> cakephp? =(
>
> On Jul 20, 10:54 am, "mattmoy...@gmail.com" 
> wrote:
> > Drupal does something like this called revisions.  You could implement
> > a much simpler version of this in your application by adding 2 columns
> > to your database called revision and display.  Revision would just be
> > a revision number and you could use a timestamp as the field so it
> > would be unique and also keep track of creation time.  The display
> > column would just be a boolean showing which revision to show.  Then
> > you would implement some revision control actions in your controller
> > to manage the revisions.
> >
> > This would actually be awesome if generalized and written as a
> > behavior.  Unfortunately, I just don't have the time right now. :(
> >
> > On Jul 19, 6:01 pm, Jay  wrote:
> >
> > > ok guys, so here is the situation:
> >
> > > - we have built up a website using cakephp and it contains several
> > > models.
> > > - we want some users to be able to "make changes" to the database via
> > > webpage
> > > - but we want to audit the changes before they are actual made to the
> > > database
> >
> > > Our problem is, how do we know what the user changed if those changes
> > > are not "saved" the first time around. We are thinking of displaying a
> > > mock database and have the admin merge it with the real db. Is there
> > > any other way to tackle this?
> > > Thanks for all your inputs.
>
> 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.comFor
>  more options, visit this group at
> http://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: Unicode problem between controller and view

2010-07-20 Thread Kirk
I thought it might get annoying... my conversation with myself. But I hope
it helps someone!

On Tue, Jul 20, 2010 at 7:47 PM, MattyHead  wrote:

> Thank you for posting your whole experience with this!  And congratulations
> for figuring it out so quickly.
>
> Cheers,
> Matt
>
> On Tue, Jul 20, 2010 at 7:15 PM, Kirk  wrote:
>
>> i found the solution here:
>> http://www.jotlab.com/2009/03/03/cakephp-utf-8/
>>
>> all you have to do is add 'encoding' => 'UTF8' to database.php
>>
>> doh!
>>
>>
>> On Tue, Jul 20, 2010 at 6:59 PM, Kirk  wrote:
>>
>>> And the plot thickens...
>>>
>>> If I change the character encoding in core.php to:
>>>
>>> Configure::write('App.encoding', 'ISO-8859-1');
>>>
>>> Then suddenly the text shows up correctly. Which means that even though
>>> I'm specifying UTF-8 as the character encoding, cake is still using
>>> ISO-8859-1 (or Windows-1252?) encoding while saying that it's using UTF-8.
>>> How frustrating!
>>>
>>>
>>> On Tue, Jul 20, 2010 at 6:17 PM, Kirk  wrote:
>>>
>>>> As an extra piece of information, if I specify the escape option
>>>> as 'ISO-8859-1' in the link method of the html helper (
>>>> http://book.cakephp.org/view/1442/link), the non-ascii characters are
>>>> substituted for html entities, and it renders fine (without the little
>>>> question marks). (I am using Windows, btw)
>>>>
>>>>
>>>> On Tue, Jul 20, 2010 at 5:37 PM, Kirk  wrote:
>>>>
>>>>> I thought someone here may have some experience with this. I fetch
>>>>> utf-8 data from a mysql db using:
>>>>>
>>>>> $this->data = find('all',$options);
>>>>>
>>>>> From within the controller, if I debug($this->data), I get something
>>>>> like:
>>>>>
>>>>> [1] => Array
>>>>> (
>>>>> [Subdivision] => Array
>>>>> (
>>>>> [name] => Aïn Témouchent
>>>>> )
>>>>>
>>>>> But if I debug($this->data) in the view, I get something like:
>>>>>
>>>>> [1] => Array
>>>>> (
>>>>> [Subdivision] => Array
>>>>> (
>>>>> [name] => A�n T�mouchent
>>>>> )
>>>>>
>>>>> The non-ascii characters don't show up correctly. I can't figure out
>>>>> why this is happening. In my core.php, I have the following option:
>>>>>
>>>>> Configure::write('App.encoding', 'UTF-8');
>>>>>
>>>>> I'm not sure what else I need to check. Any help would be greatly
>>>>> appreciated.
>>>>>
>>>>> Thanks,
>>>>> ~Kirk
>>>>>
>>>>
>>>>
>>>
>>  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.comFor
>>  more options, visit this group at
>> http://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.comFor
>  more options, visit this group at
> http://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: Unicode problem between controller and view

2010-07-20 Thread Kirk
i found the solution here:
http://www.jotlab.com/2009/03/03/cakephp-utf-8/

all you have to do is add 'encoding' => 'UTF8' to database.php

doh!

On Tue, Jul 20, 2010 at 6:59 PM, Kirk  wrote:

> And the plot thickens...
>
> If I change the character encoding in core.php to:
>
> Configure::write('App.encoding', 'ISO-8859-1');
>
> Then suddenly the text shows up correctly. Which means that even though I'm
> specifying UTF-8 as the character encoding, cake is still using ISO-8859-1
> (or Windows-1252?) encoding while saying that it's using UTF-8. How
> frustrating!
>
>
> On Tue, Jul 20, 2010 at 6:17 PM, Kirk  wrote:
>
>> As an extra piece of information, if I specify the escape option
>> as 'ISO-8859-1' in the link method of the html helper (
>> http://book.cakephp.org/view/1442/link), the non-ascii characters are
>> substituted for html entities, and it renders fine (without the little
>> question marks). (I am using Windows, btw)
>>
>>
>> On Tue, Jul 20, 2010 at 5:37 PM, Kirk  wrote:
>>
>>> I thought someone here may have some experience with this. I fetch utf-8
>>> data from a mysql db using:
>>>
>>> $this->data = find('all',$options);
>>>
>>> From within the controller, if I debug($this->data), I get something
>>> like:
>>>
>>> [1] => Array
>>> (
>>> [Subdivision] => Array
>>> (
>>> [name] => Aïn Témouchent
>>> )
>>>
>>> But if I debug($this->data) in the view, I get something like:
>>>
>>> [1] => Array
>>> (
>>> [Subdivision] => Array
>>> (
>>> [name] => A�n T�mouchent
>>> )
>>>
>>> The non-ascii characters don't show up correctly. I can't figure out why
>>> this is happening. In my core.php, I have the following option:
>>>
>>> Configure::write('App.encoding', 'UTF-8');
>>>
>>> I'm not sure what else I need to check. Any help would be greatly
>>> appreciated.
>>>
>>> Thanks,
>>> ~Kirk
>>>
>>
>>
>

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: Unicode problem between controller and view

2010-07-20 Thread Kirk
And the plot thickens...

If I change the character encoding in core.php to:

Configure::write('App.encoding', 'ISO-8859-1');

Then suddenly the text shows up correctly. Which means that even though I'm
specifying UTF-8 as the character encoding, cake is still using ISO-8859-1
(or Windows-1252?) encoding while saying that it's using UTF-8. How
frustrating!

On Tue, Jul 20, 2010 at 6:17 PM, Kirk  wrote:

> As an extra piece of information, if I specify the escape option
> as 'ISO-8859-1' in the link method of the html helper (
> http://book.cakephp.org/view/1442/link), the non-ascii characters are
> substituted for html entities, and it renders fine (without the little
> question marks). (I am using Windows, btw)
>
>
> On Tue, Jul 20, 2010 at 5:37 PM, Kirk  wrote:
>
>> I thought someone here may have some experience with this. I fetch utf-8
>> data from a mysql db using:
>>
>> $this->data = find('all',$options);
>>
>> From within the controller, if I debug($this->data), I get something like:
>>
>> [1] => Array
>> (
>> [Subdivision] => Array
>> (
>> [name] => Aïn Témouchent
>> )
>>
>> But if I debug($this->data) in the view, I get something like:
>>
>> [1] => Array
>> (
>> [Subdivision] => Array
>> (
>> [name] => A�n T�mouchent
>> )
>>
>> The non-ascii characters don't show up correctly. I can't figure out why
>> this is happening. In my core.php, I have the following option:
>>
>> Configure::write('App.encoding', 'UTF-8');
>>
>> I'm not sure what else I need to check. Any help would be greatly
>> appreciated.
>>
>> Thanks,
>> ~Kirk
>>
>
>

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: Unicode problem between controller and view

2010-07-20 Thread Kirk
As an extra piece of information, if I specify the escape option
as 'ISO-8859-1' in the link method of the html helper (
http://book.cakephp.org/view/1442/link), the non-ascii characters are
substituted for html entities, and it renders fine (without the little
question marks). (I am using Windows, btw)

On Tue, Jul 20, 2010 at 5:37 PM, Kirk  wrote:

> I thought someone here may have some experience with this. I fetch utf-8
> data from a mysql db using:
>
> $this->data = find('all',$options);
>
> From within the controller, if I debug($this->data), I get something like:
>
> [1] => Array
> (
> [Subdivision] => Array
> (
> [name] => Aïn Témouchent
> )
>
> But if I debug($this->data) in the view, I get something like:
>
> [1] => Array
> (
> [Subdivision] => Array
> (
> [name] => A�n T�mouchent
> )
>
> The non-ascii characters don't show up correctly. I can't figure out why
> this is happening. In my core.php, I have the following option:
>
> Configure::write('App.encoding', 'UTF-8');
>
> I'm not sure what else I need to check. Any help would be greatly
> appreciated.
>
> Thanks,
> ~Kirk
>

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


Unicode problem between controller and view

2010-07-20 Thread Kirk
I thought someone here may have some experience with this. I fetch utf-8
data from a mysql db using:

$this->data = find('all',$options);

>From within the controller, if I debug($this->data), I get something like:

[1] => Array
(
[Subdivision] => Array
(
[name] => Aïn Témouchent
)

But if I debug($this->data) in the view, I get something like:

[1] => Array
(
[Subdivision] => Array
(
[name] => A�n T�mouchent
)

The non-ascii characters don't show up correctly. I can't figure out why
this is happening. In my core.php, I have the following option:

Configure::write('App.encoding', 'UTF-8');

I'm not sure what else I need to check. Any help would be greatly
appreciated.

Thanks,
~Kirk

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: Tree Reorder: What Does it Do?

2010-07-16 Thread Kirk
Max, I think you're looking for http://book.cakephp.org/view/1628/Recover

<http://book.cakephp.org/view/1628/Recover>Also, I just noticed that
reorder() is in 2 different places in the documentation, and the 2nd place
already has the complete documentation. Now I can't remember if I passed the
id in an options array or not when I got the error.

On Fri, Jul 16, 2010 at 3:28 PM, Max  wrote:

> Not sure if this applies but I had an existing DB that has:
> id | name | parent_id
>
> I added the two other fields (lft and rght) but how to I get these
> populated with the correct values so 'generatetreelist' will work
> correctly?
>
> Thanks.
>
>
> On Jul 16, 8:37 am, Kirk  wrote:
> > Why are you editing the 1.2 documentation instead of 1.3? I submitted a
> more
> > complete documentation of the reorder function a week ago after looking
> > through the code, but still no one has approved it. I don't know what
> those
> > cake people are doing over there. I used reorder to order by name field,
> > which is default, and it worked fine. You just call $model->reorder().
> It's
> > supposed to take an id as a parameter as well, but I got an error when I
> > tried to pass an id.
> >
> > ~Kirk
> >
> > On Fri, Jul 16, 2010 at 8:30 AM, DragonFlyEye  >wrote:
> >
> > > Ok, for those who happen upon this thread looking for a method of
> > > ordering their Tree children, I did a bit of digging into the actual
> > > code and discovered that there are in fact more arguments to the
> > > children() function than are documented in the Book. I've made
> > > corrections to the Book which will hopefully fill in soon:
> > >http://book.cakephp.org/view/228/Basic-Usage#Children-525
> > > children() in fact takes several arguments (though strangely, not in
> > > an $options array like you might expect from CakePHP) including an
> > > $order SQL ORDER BY statement. So, whatever reorder() is supposed to
> > > do, this is actually not the way to organize your tree structure for
> > > display.
> >
> > > Hope that helps someone!! It's been a heck of a struggle for me,
> > > personally.
> >
> > > 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 at
> > >http://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.comFor
>  more options, visit this group at
> http://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: Tree Reorder: What Does it Do?

2010-07-16 Thread Kirk
Why are you editing the 1.2 documentation instead of 1.3? I submitted a more
complete documentation of the reorder function a week ago after looking
through the code, but still no one has approved it. I don't know what those
cake people are doing over there. I used reorder to order by name field,
which is default, and it worked fine. You just call $model->reorder(). It's
supposed to take an id as a parameter as well, but I got an error when I
tried to pass an id.

~Kirk

On Fri, Jul 16, 2010 at 8:30 AM, DragonFlyEye wrote:

> Ok, for those who happen upon this thread looking for a method of
> ordering their Tree children, I did a bit of digging into the actual
> code and discovered that there are in fact more arguments to the
> children() function than are documented in the Book. I've made
> corrections to the Book which will hopefully fill in soon:
> http://book.cakephp.org/view/228/Basic-Usage#Children-525
> children() in fact takes several arguments (though strangely, not in
> an $options array like you might expect from CakePHP) including an
> $order SQL ORDER BY statement. So, whatever reorder() is supposed to
> do, this is actually not the way to organize your tree structure for
> display.
>
> Hope that helps someone!! It's been a heck of a struggle for me,
> personally.
>
> 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.comFor
>  more options, visit this group at
> http://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: cakeDC Tag Plugin Delete issue

2010-07-15 Thread Kirk
I think I know what the problem is. It just occurred to me that all you have
to do is add a condition in the $hasAndBelongsToMany relationship in the
model to ensure that both the foreign key and the model are matched in the
Tagged table. This way you can avoid the custom query hack.

~Kirk

On Wed, Jul 14, 2010 at 10:35 AM, Kirk  wrote:

> perhaps the problem is that the Taggable behavior has no beforeDelete
> callback
>
>
> On Wed, Jul 14, 2010 at 2:45 AM, abocanegra wrote:
>
>> I solved it, You can check out the code on my blog
>>
>> http://www.whatartist.com/blog/2010/07/making-cakedc-tags-plugin-delete-by-model-only/
>>
>> On Jul 8, 4:35 am, abocanegra  wrote:
>> > I have been enjoying the Tag Plugin by CakeDC. However, I am having an
>> > issue when it is utilized across multiple models (i.e Photo, Design,
>> > Video). When I delete an entry with tags in say Photos it deletes
>> > based off of foreign_key which is the ID of photos. However, if I also
>> > have the same ID in Designs or Videos it also deletes those tags. I am
>> > aware of the options in the actsas function in the model. Still i am
>> > unable to figure out how to delete based on foreign_key and model =>
>> > Design ( or the appropriate model in any case ).
>> >
>> > Has anybody had experience with this?
>> >
>> > my model currently is just using the default:
>> >
>> > var $actsAs = array(
>> > 'Tags.Taggable');
>> >
>> > The additional options on their site are:
>> >
>> > var $actsAs = array(
>> > 'Tags.Taggable' => array(
>> > 'separator' => '',
>> > 'field' => 'tags',
>> > 'tagAlias' => 'Tag',
>> > 'tagClass' => 'Tags.Tag',
>> > 'taggedClass' => 'Tags.Tagged',
>> > 'foreignKey' => 'foreign_key',
>> > 'associationForeignKey' => 'tag_id',
>> > 'automaticTagging' => true,
>> > 'unsetInAfterFind' => false,
>> > 'resetBinding' => false,
>> > )
>> > );
>> >
>> > This is the last obstacle I have before launching my new site, it
>> > seems small, but it is quite frustrating.
>>
>> 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.comFor
>>  more options, visit this group at
>> http://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: cakeDC Tag Plugin Delete issue

2010-07-14 Thread Kirk
perhaps the problem is that the Taggable behavior has no beforeDelete
callback

On Wed, Jul 14, 2010 at 2:45 AM, abocanegra wrote:

> I solved it, You can check out the code on my blog
>
> http://www.whatartist.com/blog/2010/07/making-cakedc-tags-plugin-delete-by-model-only/
>
> On Jul 8, 4:35 am, abocanegra  wrote:
> > I have been enjoying the Tag Plugin by CakeDC. However, I am having an
> > issue when it is utilized across multiple models (i.e Photo, Design,
> > Video). When I delete an entry with tags in say Photos it deletes
> > based off of foreign_key which is the ID of photos. However, if I also
> > have the same ID in Designs or Videos it also deletes those tags. I am
> > aware of the options in the actsas function in the model. Still i am
> > unable to figure out how to delete based on foreign_key and model =>
> > Design ( or the appropriate model in any case ).
> >
> > Has anybody had experience with this?
> >
> > my model currently is just using the default:
> >
> > var $actsAs = array(
> > 'Tags.Taggable');
> >
> > The additional options on their site are:
> >
> > var $actsAs = array(
> > 'Tags.Taggable' => array(
> > 'separator' => '',
> > 'field' => 'tags',
> > 'tagAlias' => 'Tag',
> > 'tagClass' => 'Tags.Tag',
> > 'taggedClass' => 'Tags.Tagged',
> > 'foreignKey' => 'foreign_key',
> > 'associationForeignKey' => 'tag_id',
> > 'automaticTagging' => true,
> > 'unsetInAfterFind' => false,
> > 'resetBinding' => false,
> > )
> > );
> >
> > This is the last obstacle I have before launching my new site, it
> > seems small, but it is quite frustrating.
>
> 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.comFor
>  more options, visit this group at
> http://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: Fatal error: Allowed memory size of 16777216 bytes exhausted

2010-07-14 Thread Kirk
i've been attempting to reduce memory consumption on my app too.

use debug($this) to see the different objects loaded into memory, and make
sure to pass by reference where possible.

i also added this snippet at the bottom of my default.ctp:

echo 'Memory Usage:';
$memory_in_bytes = memory_get_peak_usage();
echo '_B: '.$memory_in_bytes.'';
echo 'KB: '.round($memory_in_bytes/1024,1).'';
echo 'MB: '.round($memory_in_bytes/1024/1024,1).'';

by reducing recursion and turning off some helpers and i can't remember what
else, i managed to reduce memory use by about 0.6mb, but so far no more than
that.

~Kirk

On Tue, Jul 13, 2010 at 8:02 AM, Jeremy Burns | Class Outfit <
jeremybu...@classoutfit.com> wrote:

> I'd also check your model associations and controller code to check that
> you are not in a recursive loop, retrieving too much data or have some other
> gotcha. IMO, I think it's better to get to and fix the root cause rather
> than just paper over it. If your memory is really being stretched, then you
> will not have optimum performance.
>
> Jeremy Burns
> Class Outfit
>
> jeremybu...@classoutfit.com
> http://www.classoutfit.com
>
> On 13 Jul 2010, at 12:58, Ayman Bedair wrote:
>
> > This happened with me on the local windows server while testing,
> > didn't really see the problem up on my live one.
> >
> > Anyway if u have access to the PHP.INI file you can just go there and
> > edit the "memory_limit = 16M" value to something like "memory_limit =
> > 50M". I had this set to 150MB and it didn't affect the computer
> > stability so go up until it's sufficient for you app to run. (You need
> > to restart your server after changing this value for the new settings
> > to take effect)
> >
> > If this is not a convenient solution try setting the debug to 0 and
> > the  "var $persistModel = false;" in your controllers. That should
> > save up some of the memory space I believe.
> >
> > 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.comFor
> >  more options, visit this group at
> http://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.comFor
>  more options, visit this group at
> http://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