Containable Behavior and HABTM

2008-06-10 Thread dizz

Hello I am trying to use the containable behavior in a category
controller that habtm posts. In the view action of the category
controller I am trying to display all posts for the category and also
all of the posts categories.

Here is what I am trying to use:

$this-Category-contain(array('Post' = array('User.name',
'Category')));

But I still cannot get the categories for the post.

If I do something like the following in the category view action I do
get the categories for the post but I also get all the posts and not
just the ones tied to the category:

$this-Category-Post-contain(array('User.name', 'Category.name'));
pr($this-Category-Post-findAll());

Any help would be greatly appreciated.
Thanks

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Changing the controller in the $ajax-form helper.

2008-04-22 Thread dizz

Hey, I've been trying to figure this out for a few hours now. I am
either missing something or you cannot change the controller in the
helper and that it will always default to the controller of the parent
page.

For instance I am trying to add comments on a user profile, the parent
profile is Users and no matter what I try putting in the helper
(array like a normal form helper, url for ajax helpers) it keeps on
defaulting to the Users controller.

Any help would be greatly appreciated thanks.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Trying to figure out the best way to set up a Friend to Friend relationship.

2008-04-16 Thread dizz

grigri:

Thanks, this is what I had originally thought up:

Although perhaps you could act as if it was asymmetric, but
synchronize `friendship` table updates : if you create or delete
{subject_id: 1, object_id: 2} then you must simultaneously create/
delete  {subject_id: 2, object_id: 1}. You'd get data duplication,
sure, but it might make things easier to manage.

My problem now is saving the data. Lets say I have an action
saveFreindship() and I pass in the parameters for subject_id and
object_id,
how do I set up the save using the model?

For instance if I was using a form it would be as simple as $this-
User-save($data) but since I am sending the data is as parameters I
can't seem to get it to work.

Again, any help is greatly appreciated.

Thanks,
-Andrew


On Apr 9, 5:25 pm, grigri [EMAIL PROTECTED] wrote:
 It depends entirely on whether you want the friendship relation to be
 symmetric or not.

 Symmetric: If Fred is Joe's friend then Joe is Fred's friend and vice-
 versa
 Asymmetric: Fred can be Joe's friend regardless of whether or not Joe
 is Fred's friend.

 An asymmetric relation would be easier to implement:

 table: friendships (id, subject_id, object_id) [person `subject_id`
 regards person `object_id` as a friend]

 class Person extends AppModel {
   var $hasAndBelongsToMany = array(
     'Friend' = array( // People that this person regards as a friend
       'className' = 'Person',
       'with' = 'Friendship',
       'foreignKey' = 'subject_id',
       'associationForeignKey' = 'object_id'
     ),
     'Admirer' = array( // People who regard this person as a friend
       'className' = 'Person',
       'with' = 'Friendship',
       'foreignKey' = 'object_id',
       'associationForeignKey' = 'subject_id'
    )
   );

 }

 Symmetric relationships would be trickier. As I see it, you'd have to
 use a custom query to retrieve/update/delete the data, and always
 enforce a constraint that (for example) subject_id  object_id [to
 avoid duplicates].

 Although perhaps you could act as if it was asymmetric, but
 synchronize `friendship` table updates : if you create or delete
 {subject_id: 1, object_id: 2} then you must simultaneously create/
 delete  {subject_id: 2, object_id: 1}. You'd get data duplication,
 sure, but it might make things easier to manage.

 Hope this helps - let me know how this progresses, as it's quite an
 interesting subject.

 On Apr 9, 10:06 am, dizz [EMAIL PROTECTED] wrote:

  Hi all,

  I'm trying to add a friend feature to one of my sites.

  I am trying to wrap my head around how to set up the relationship.

  I have a table users which holds all the users info.

  Each user can have many friends which is just an alias for many users
  and those friends (users) belong to the User.

  This sounds like a HABTM relation, but how would I go about setting it
  using the same model?

  Any help would be greatly appreciated.

  Thanks,
  -Andrew
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Trying to figure out the best way to set up a Friend to Friend relationship.

2008-04-09 Thread dizz

Hi all,

I'm trying to add a friend feature to one of my sites.

I am trying to wrap my head around how to set up the relationship.

I have a table users which holds all the users info.

Each user can have many friends which is just an alias for many users
and those friends (users) belong to the User.

This sounds like a HABTM relation, but how would I go about setting it
using the same model?

Any help would be greatly appreciated.

Thanks,
-Andrew
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Yet another HABTM problem with self-referencing model (var useTable)

2008-04-04 Thread dizz

I was just having the same problem, used your method and it's working
fine now.

On Mar 30, 9:36 pm, ste.ve [EMAIL PROTECTED] wrote:
 To visualize it better, these are my example Model definitions

 WORKS:

 class Tag extends AppModel {

         var $hasAndBelongsToMany = array(
                                  'Tag2' = array(
                                                         'foreignKey' = 
 'tag_id',

 'associationForeignKey' = 'tag2_id', )
                                 );

 }

 class Tag2 extends AppModel {

         var $useTable = tags;

         var $hasAndBelongsToMany = array(
                                  'Tag' = array(
                                          'foreignKey' = 'tag2_id',
                                          'associationForeignKey' = 'tag_id',
                         ));

 }

 DOESN'T WORK (in the result set, all rows for Tag2 contain the value
 from Tag - the number of results is correct, anyhow)

 class Tag extends AppModel {

         var $hasAndBelongsToMany = array('Tag2' );

 }

 class Tag2 extends AppModel {

         var $useTable = tags;

         var $hasAndBelongsToMany = array( 'Tag' );

 }
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How do I set focus to a form input field?

2008-01-21 Thread dizz

Just add an ID to the form input:

?=$form-input('title', array('id' = 'title'))?

Then in the JS you can do:

document.getElementById('title').focus();

On Jan 22, 5:52 am, Carl [EMAIL PROTECTED] wrote:
 I used to do this with something like this:

                         script 
 type='text/javascript'document.post_form.title.focus();/
 script

 but CakePHP forms use dot notation in the field names.

 I haven't found anything in the existing documentation.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Auth Component encrypting password before validation.

2008-01-17 Thread dizz

Hello,

I am using the auth component and before my model can validate the
password the auth component already encrypts the password so making it
impossible to use the between built in valid method.

Is there any work around for this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Auth Component encrypting password before validation.

2008-01-17 Thread dizz

Thanks to both of you, I thought of this, but I thought it would be
easier to disable the AuthComponent::hashPasswords and then do what
Baz did above.

Anyways thanks again for the help.

-Andrew

On Jan 17, 10:45 pm, Baz [EMAIL PROTECTED] wrote:
 Yep,

 Use a different field, eg. new_password or something. (I'm assuming
 you're validating when creating a password. No need for login)

 Here's assuming you have a model called User:

 // needed for validation for some reason
 $this-User-set($this-data);
 if ($this-validates($this-data))
 {
     $this-data['User']['passwd'] =
 $this-Auth-password($this-data['User']['new_passwd'] )

     // all we did was hash passwords, no need to revalidate.
     if ($this-save($this-data, false))
     {
         //    do stuff
     } else
     {
         // invalid
     }

 }

 Would be nice to stick this is beforeSave in the model, but you can't
 [easily] access the Auth component from the model.

 Hope this helps.

 On Jan 17, 2008 9:31 AM, dizz [EMAIL PROTECTED] wrote:



  Hello,

  I am using the auth component and before my model can validate the
  password the auth component already encrypts the password so making it
  impossible to use the between built in valid method.

  Is there any work around for this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Parameter recursive not used in funtion Model::find?

2008-01-08 Thread dizz

Take a look here 
http://api.cakephp.org/1.2/class_model.html#e60758f27fa8486a063b8cc424bad741

In the example you can see that you set the recursive level in the
conditions array

Eg: find('all', array( 'conditions' = array('name' =
'mariano.iglesias'), 'fields' = array('name', 'email'), 'order' =
'field3 DESC', 'recursive' = 2));

On Jan 8, 6:08 pm, J. Eckert [EMAIL PROTECTED] wrote:
 Hi there,

 In the newest release of Cake 1.2 (pre-beta) the 4th parameter of the
 funtion Model::find ($recursive) doesn't seem to work anymore. Is this
 a bug or a feature?
 Doesn't make any sense for me, cause it's in the signature and no
 warning is generated.

 Recursive find's only work if you set Model-recursive before the find
 and not through the find-parameter any more.

 Is this as it is supposed to be?

 Cheers,
 Joachim
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: ajax not working

2007-12-26 Thread dizz

Where is the call to the action?

On Dec 26, 1:12 am, rtgwork [EMAIL PROTECTED] wrote:
 I have this code in my view:

 form name=configurator id=configurator
     input type=hidden name=cpu value=?php echo $cpuAll; ?
     input type=hidden name=primaryhd value=?php echo
 $primaryhdAll; ?
     input type=hidden name=secondaryhd value=?php echo
 $secondaryhdAll; ?
     input type=hidden name=memory value=?php echo $memoryAll; ?

     input type=hidden name=backup value=?php echo $backupAll; ?

     input type=hidden name=os value=?php echo $osAll; ?
     input type=button name=submit value=submit border=0
 onclick=new Ajax.Updater('updateDiv', 'mailer', {asynchronous:true,
 evalScripts:true, parameters:Form.serialize(this.form)})
 /form

 In my controller in function mailer(), I am using pr($this-data), but
 there is nothing showing.  Looks like the ajax call is not passing the
 serialized form.

 What is wrong with my code?

 Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Integration of Ext js in cakephp

2007-12-26 Thread dizz

Why not just put it in the /webroot/js/ folder then you can call ?=
$javascript-link('ext-js/ext')? if you have the javascript helper
included in your controller.


On Dec 26, 1:52 pm, [EMAIL PROTECTED] wrote:
  I am new to cakephp... how to include ext-js folder.? should i put it in 
 vendors if yes then help me regarding settings and if NO then where should 
 i put ext-js  folder?

 please reply me  on [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RESTful CakePHP

2007-12-21 Thread dizz

Hello,

I see in the code that there is plans to make CakePHP RESTful.

Does this functionality work yet? I have been testing with a Post/
Posts model/controller and have added the
Router::mapResources('posts'); to the routes file.

For some reason if I go to /cakeapp/posts/1 it sends me back to the
index method with the session flash stating that there is an invalid
post.

Has anyone gotten this to work?

Thanks,
-Andrew
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: RESTful CakePHP

2007-12-21 Thread dizz

I just found that it does pass the ID just not the same way that non-
restful cake works.

You need to grab the id from $this-params['id']

On Dec 21, 4:17 pm, dizz [EMAIL PROTECTED] wrote:
 Hello,

 I see in the code that there is plans to make CakePHP RESTful.

 Does this functionality work yet? I have been testing with a Post/
 Posts model/controller and have added the
 Router::mapResources('posts'); to the routes file.

 For some reason if I go to /cakeapp/posts/1 it sends me back to the
 index method with the session flash stating that there is an invalid
 post.

 Has anyone gotten this to work?

 Thanks,
 -Andrew
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: how can we create datagrind in cakephp using ajax helper

2007-12-21 Thread dizz

There isn't an Ajax helper for a datagrid but take a look at extjs.com

On Dec 21, 11:35 am, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Hi,
 i just want to know ,
 how can we create datagrind in cakephp using ajax helper
 I have post this topic before this also
 but I didn't find any solution
 please help me, if anyone finds the solution
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: how to REST in new CakePHP1.2

2007-10-24 Thread dizz

I am also interested on seeing how this is done. I have figured it out
somewhat but still need direction on how to pass the method/type (such
as delete) through a link similar to how RoR does it.

-Andrew

On Oct 24, 1:23 pm, a.php.programmer [EMAIL PROTECTED]
wrote:
 in new CakePHP1.2, I find Router::mapResources('Posts'); it is good
 for REST.

 but I don't know how to take a PUT, DELETE method in form,

 in FormHelper and HtmlHelper, I don't find useable funcitons.

 how?


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



Re: New CakePHP Releases

2007-10-23 Thread dizz

How is Router::mapResources('Posts'); used in the Controller and in
the views?


Larry E. Masters aka PhpNut wrote:
 We have some new releases available for download. Version 1.1.18.5850 [1] is
 a bug fix update to the current stable release. Version 1.2.0.5875 pre-beta
 [2] is the pre beta release of the current development version.

 We decided to have pre beta since a lot of new features have been added
 since the last alpha release. There are still some new features to
 implement, so we are holding the beta release until all the enhancement
 tickets are closed. This release took a little bit longer than expected, but
 we say it was worth the wait.

 As usual, this release includes hundreds of minor fixes, enhancements, and
 speed improvements.  This release also includes several major feature
 additions, which we've been working hard on to implement so CakePHP remains
 the best framework for web application development in PHP.

 A number of important features were added to improve support for
 implementing web services, including simplified REST routing, i.e.:

 Router::mapResources('posts');

 This will map each HTTP request to it's corresponding controller method
 (index, view, add, edit or delete).  For example, a PUT request to /posts/1
 maps to the edit() method of PostsController.  In addition, the Router now
 supports a whole range of HTTP header detection options.  Controlling access
 to your web services is easier than ever, too.  The Security component now
 supports HTTP basic and digest authentication, which is easily configurable
 in your controller's beforeFilter() method.

 The Auth component has also undergone extensive refactoring, making it
 possible for you to plug in your own custom login authentication method or
 access control system.

 In the first of several major changes to the Model, findCount() and
 findAll() are being replaced by the new find() syntax.  This new syntax
 allows you to specify parameters as an array, like the following:

 Post-find('count', array('conditions' = array('Post.comments_count' = '
 20'));
 Post-find('first', array('conditions' = array('Post.comments_count' = '
 20'), 'order' = 'Post.date ASC'));
 Post-find('all', array('limit' = 10, 'order' = 'Post.date ASC'));

 Pagination flexibility has also been improved with the addition of
 Model::paginate(), and Model::paginateCount(), which you can define in your
 models to handle custom pagination.  Each method takes the same parameters
 as findAll() and findCount(), respectively.

 Also in the database department, schema generation has been implemented for
 several databases.  Schema generation allows you to create and edit your
 database schemas with your favorite tool, and Cake's schema tools will
 manage the changes for you.

 In an ongoing effort to improve the flexibility of Cake's (minimalistic)
 configuration, most of the constants in core.php have been migrated to
 settings in the Configure class.  Check out the latest version of
 core.phpand update your app's configuration accordingly.  To help you
 identify the
 settings that should be changed, friendly warning messages have been added
 to point you in the right direction.

 In addition to code, the docs team has been hard at work over the past few
 months improving the documentation, and along with this release, we're now
 ready to unveil the pre-beta version of the CakePHP 1.2 manual, at
 http://tempdocs.cakephp.org/.  There are still many things missing, but if
 you find any errors, please submit documentation tickets.

 And last but certainly not least, significant work has done to lay the
 foundation for full, PHP-native Unicode support in CakePHP. This means we do
 not have to wait for PHP6 to make it possible to fully internationalize your
 PHP application on any platform, independent of installed extensions.

 With all these new features, we hope you agree that CakePHP 1.2 pre-beta was
 worth the wait.  This will be the last release before the 1.2 API is fully
 stabilized, and we can't wait for you to try it.

 [1] Download 1.1.18.5850:
 http://cakeforge.org/frs/?group_id=23release_id=343
 1.1.x.x change long: https://trac.cakephp.org/wiki/changelog/1.1.x.x

 [2] Download 1.2.0.5875 pre-beta:
 http://cakeforge.org/frs/?group_id=23release_id=344
 1.2.x.x change log: https://trac.cakephp.org/wiki/changelog/1.2.x.x

 --
 /**
 * @author Larry E. Masters
 * @var string $userName
 * @param string $realName
 * @returns string aka PhpNut
 * @access  public
 */


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



Re: New CakePHP Releases

2007-10-23 Thread dizz

Yes, I realized that :)

I copied that line into my routes file and went to project/posts/1
instead of project/posts/view/1 and it says post not found, so I
assume there is more than just sticking that line in the routes file.
Also is there something to pass the method in the views? For instance
if I wanted to create an html link to delete how could I pass the
correct resource type for that link?

Thanks again for all the great work, I love this framework!

On Oct 23, 8:02 pm, nate [EMAIL PROTECTED] wrote:
 As with most Router methods, this one is called in config/routes.php.

 On Oct 23, 8:21 am, dizz [EMAIL PROTECTED] wrote:

  How is Router::mapResources('Posts'); used in the Controller and in
  the views?

  Larry E. Masters aka PhpNut wrote:

   We have some new releases available for download. Version 1.1.18.5850 [1] 
   is
   a bug fix update to the current stable release. Version 1.2.0.5875 
   pre-beta
   [2] is the pre beta release of the current development version.

   We decided to have pre beta since a lot of new features have been added
   since the last alpha release. There are still some new features to
   implement, so we are holding the beta release until all the enhancement
   tickets are closed. This release took a little bit longer than expected, 
   but
   we say it was worth the wait.

   As usual, this release includes hundreds of minor fixes, enhancements, and
   speed improvements.  This release also includes several major feature
   additions, which we've been working hard on to implement so CakePHP 
   remains
   the best framework for web application development in PHP.

   A number of important features were added to improve support for
   implementing web services, including simplified REST routing, i.e.:

   Router::mapResources('posts');

   This will map each HTTP request to it's corresponding controller method
   (index, view, add, edit or delete).  For example, a PUT request to 
   /posts/1
   maps to the edit() method of PostsController.  In addition, the Router now
   supports a whole range of HTTP header detection options.  Controlling 
   access
   to your web services is easier than ever, too.  The Security component now
   supports HTTP basic and digest authentication, which is easily 
   configurable
   in your controller's beforeFilter() method.

   The Auth component has also undergone extensive refactoring, making it
   possible for you to plug in your own custom login authentication method or
   access control system.

   In the first of several major changes to the Model, findCount() and
   findAll() are being replaced by the new find() syntax.  This new syntax
   allows you to specify parameters as an array, like the following:

   Post-find('count', array('conditions' = array('Post.comments_count' = 
   '
   20'));
   Post-find('first', array('conditions' = array('Post.comments_count' = 
   '
   20'), 'order' = 'Post.date ASC'));
   Post-find('all', array('limit' = 10, 'order' = 'Post.date ASC'));

   Pagination flexibility has also been improved with the addition of
   Model::paginate(), and Model::paginateCount(), which you can define in 
   your
   models to handle custom pagination.  Each method takes the same parameters
   as findAll() and findCount(), respectively.

   Also in the database department, schema generation has been implemented 
   for
   several databases.  Schema generation allows you to create and edit your
   database schemas with your favorite tool, and Cake's schema tools will
   manage the changes for you.

   In an ongoing effort to improve the flexibility of Cake's (minimalistic)
   configuration, most of the constants in core.php have been migrated to
   settings in the Configure class.  Check out the latest version of
   core.phpand update your app's configuration accordingly.  To help you
   identify the
   settings that should be changed, friendly warning messages have been added
   to point you in the right direction.

   In addition to code, the docs team has been hard at work over the past few
   months improving the documentation, and along with this release, we're now
   ready to unveil the pre-beta version of the CakePHP 1.2 manual, at
  http://tempdocs.cakephp.org/.  There are still many things missing, but if
   you find any errors, please submit documentation tickets.

   And last but certainly not least, significant work has done to lay the
   foundation for full, PHP-native Unicode support in CakePHP. This means we 
   do
   not have to wait for PHP6 to make it possible to fully internationalize 
   your
   PHP application on any platform, independent of installed extensions.

   With all these new features, we hope you agree that CakePHP 1.2 pre-beta 
   was
   worth the wait.  This will be the last release before the 1.2 API is fully
   stabilized, and we can't wait for you to try it.

   [1] Download 1.1.18.5850:
  http://cakeforge.org/frs/?group_id=23release_id=343
   1.1.x.x change long:https

Re: code in Title bar

2007-10-10 Thread dizz

Notice (8): Undefined variable: title_for_layout [CORE/app/views/
elements/head.ctp, line 3]

Where are you setting this variable, try doing this in your action in
the controller:

$this-set('title', 'Title name here');

On Oct 11, 10:46 am, befidled [EMAIL PROTECTED] wrote:
 I've got a lot of code from my cake app showing up in my title bar.
 What could be causing this?

 http://www.tolerase.com/items


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



phpThumb Component

2007-03-25 Thread dizz

Does anyone know if this works with Cake 1.2xxx? I keep on getting the
following error:

(
[0] = could not generate thumbnail
)

Any help would be greatly appreciated.

Thanks,
-Andrew


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



Site wide variable.

2007-03-22 Thread dizz

Hello,

I am trying to set a variable in my AppController to be accessed by
all controllers. I have an element on all of my pages that displays
last user logins.

At first I was trying to use the User model in the AppController by
using the $uses variable but for some reason the PageController was
not overridden (but all other controllers worked fine). Then I was
pointed to the requestAction method. I am now trying to set the
variable using the requestAction method but it keeps on looping.

Below is the code for my AppController

function beforeFilter () {
if ($this-action != 'login'  $this-action != 'logout'  
$this-
action != 'getLogins') {
$this-checkSession();
$this-set(user_data, $this-Session-read('User'));
$this-set('login_data', 
$this-requestAction('/users/getLogins',
array('return')));
}
}

Below is the code for my UsersController

function getLogins () {
$this-User-Login-findAll();
}


Any help would be greatly appreciated. Thanks,
-Andrew


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



Variable to find Current Controller

2007-03-14 Thread dizz

Is there a Cake method or variable to get the current controller and
action?

Thanks in advance.


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



Re: Variable to find Current Controller

2007-03-14 Thread dizz

That is exactly what I need it for ;)

Thanks again.

On Mar 14, 11:16 pm, djiize [EMAIL PROTECTED] wrote:
 it's useful to highlight current menu in a navbar for instance

 I use it to select the correct ad banner for a page (different banner
 by theme)

 On 14 mar, 17:11, Chris Hartjes [EMAIL PROTECTED] wrote:

  On 3/14/07, dizz [EMAIL PROTECTED] wrote:

   Is there a Cake method or variable to get the current controller and
   action?

   Thanks in advance.

  This is a question I see a lot, and wonder why so many people need to
  know this information?  I've used other frameworks and have never run
  into a situation in my application where I needed to know what
  controller or action I was currently using.

  Are there certain problems that are only solvable if you know this info?

  --
  Chris Hartjes

  My motto for 2007:  Just build it, damnit!

  rallyhat.com - digital photo scavenger hunt
  @TheBallpark -http://www.littlehart.net/attheballpark
  @TheKeyboard -http://www.littlehart.net/atthekeyboard


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



Using Javascript in Static Pages

2007-03-14 Thread dizz

Hello, how can you access the javascript helper using the static
pages? ie. PagesController


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



Re: Using Javascript in Static Pages

2007-03-14 Thread dizz

Thanks, works great!

On Mar 15, 2:59 am, Mariano Iglesias [EMAIL PROTECTED]
wrote:
 1. Copy cake/libs/controller/pages_controller.php to your app/controllers.

 2. Open and change:

 var $helpers = array('Html');

to:

 var $helpers = array('Html', 'Javascript');

 and that's it.

 -MI

 ---

 Remember, smart coders answer ten questions for every question they ask.
 So be smart, be cool, and share your knowledge.

 BAKE ON!

 blog:http://www.MarianoIglesias.com.ar

 -Mensaje original-
 De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
 de dizz
 Enviado el: Miércoles, 14 de Marzo de 2007 04:52 p.m.
 Para: Cake PHP
 Asunto: Using Javascript in Static Pages

 Hello, how can you access the javascript helper using the static
 pages? ie. PagesController


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



Re: Web Services in Cake 1.2.x.x

2007-03-13 Thread dizz

Just took a look, looks pretty simple. Does CakePHP have any SOAP
functionality built in?

On Mar 14, 9:58 am, Chris Hartjes [EMAIL PROTECTED] wrote:
 Hey guys, with some help from Nate I just put together a little blog
 entry on my experiences building a web service with Cake 1.2.x.x.

 http://www.littlehart.net/atthekeyboard/2007/03/13/how-easy-are-web-s...

 (If the link above is destroyed by your mailer, just go 
 tohttp://www.littlehart.net/atthekeyboardand it will be there).

 Comments and feedback always welcome, as I am a self-promoting whore
 who loves the attention.

 --
 Chris Hartjes

 My motto for 2007:  Just build it, damnit!

 rallyhat.com - digital photo scavenger hunt
 @TheBallpark -http://www.littlehart.net/attheballpark
 @TheKeyboard -http://www.littlehart.net/atthekeyboard


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