Re: User Authentication and User Management

2006-11-09 Thread AD7six

Hi all,

What /exactly/ is the scope being discussed..? The easiest way to make
something not generic/reusable is to make it do more than one thing.

On Nov 8, 4:25 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Wouldn't it be nice... if we had a cake authentication component (like
 othAuth 0.5) with plug-ins that could handle the some of the common
 user management features like:

 +User authentication
 +User profile views
 +Views to and manage (edit) Group Permissions
 +Email verification
 +User profile management

Editing permissions is not related to authentication or user
management, and anything that ties your user management to a particular
access control/permissions system will automatically not be generic.

 So I have 3 questions for the cake community:
  1. Do you have any suggestions/requests for specific functionality?
  2. Is anyone interested in participating in such a project?
  3. Would othAuth be a good place to start?

Oth Auth provides both auth and access control, and acm provides user
management and ACL adminstration (or something like that, I use neither
now so can easily be wrong). Both probably provide ideas, but I would
not have thought either was a base for a 'standard' auth and user
management solution.

It seems to me that what is being looked for are these things:
1) a standard User controller, model and view - that takes care of the
public user functions (register, forgot password, change password)
2) a standard login and authorisation mechanism.
3) a user management plugin to adminster groups and users

Dieter's article addresses 2 quite nicely; I'm sure many people have
done something for 1, and the problem with 3 is that it's probably
project dependent. To create a user management plugin that is generic
might be possible by defining the names of the user and group/role
models and using the associations to determine if they are n-1 n-n, or
n-doesn'texist etc. Note that in the list above access control and AC
management has been (deliberately) completely left out - AC and ACL
management are covered on my site (still haven't had time to make the
download more friendly to install but it is pseudo plug and play if you
put the files in place and define the constant for your user table),
but I would consider that out of scope.

So what is it that you are all discussing :)?

By the way I seem to remember reading on IRC that a generic user
'module' (I deliberately choose an ambiguous word) could be in the
works for the core.

AD7six

Please note:
The manual/bakery is a good place to start any quest for info.
The cake search (at the time of writing) erroneously reports less/no
results for the google group.
The wiki may contain incorrect info - read at your own risk (it's
mainly user submitted) :)
You may get your answer quicker by asking on the IRC Channel (you can
access it with just a browser here: http://irc.cakephp.org).
On Nov 3, 10:43 pm, PD [EMAIL PROTECTED] wrote:


--~--~-~--~~~---~--~~
 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: access to $HTTP_RAW_POST_DATA

2006-11-09 Thread chwagssd

I found this at
http://www.phpbuilder.com/board/showthread.php?t=10304087 , hope it
helps.
--

 From the user comments in the PHP manual for predefined variables
where $HTTP_RAW_POST_DATA is discussed.
It should be noted that $HTTP_RAW_POST_DATA only exists if the encoding
type of the data is -not- the default of
application/x-www.form-urlencoded, and so, to accessing raw post data
from an HTTP form requires setting enctype= in your HTML.

Try setting the enctype to text/xml and see if that helps any.

Also, it's in the $GLOBALS array, so try $GLOBALS['HTTP_RAW_POST_DATA']
instead.
__
He is my Defender, I will not be defeated!, Psalm 62:6 (New Century)
I may not produce beautiful code, but at least God has blessed me with
the ability to produce beautiful children!
Last edited by TheDefender : 07-09-2005 at 09:24 PM.


--~--~-~--~~~---~--~~
 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: Problems connecting to MySQL 4.1 on PHP 5.1.1 using IIS 6

2006-11-09 Thread chwagssd

Hate to ask a simple question, but perhaps it will help. Did you make
sure that your database host was localhost? Or could you perhaps use
your local ip like 192.181.1.*   ? Let us know what you are putting for
your database host.


--~--~-~--~~~---~--~~
 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 use $ajax-sortable and update in a db?

2006-11-09 Thread f.

Hi,

 Should I creat a field called order in my, such as topics table?


Yes, you should.
What worked for me:


In my view, I have a div with the sortable items:
div id=sortlist
?php foreach ($data as $data): ?
div id=artdiv_?php echo $data['Article']['id']; ?
class=sortablediv
pwhatever.../p
/div
?php endforeach; ?
/div

I create the sortable js-code with

?php echo $ajax-sortable('sortlist', array(
'tag'   = 'div',
'onUpdate'  =
'submit_sort'
)); ?
You need to define the function to submit the data:
script type=text/javascript charset=utf-8
function submit_sort() {
var u = new Ajax.Updater('col4', /* i update a div with the
results,,, */
'?php echo
$html-url('/admin/articles/sort/'.$catid).'?' ?' +
Sortable.serialize('sortlist'),
{

onLoading:function(request){$('indicator').show()},

onLoaded:function(request){$('indicator').hide()},
asynchronous:true,
evalScripts:true,
requestHeaders:['X-Update', 'col4']
}, false);
}
/script
the important part is to append the serialized list to the URL.
Later in your controller you can access the data with
$this-params['url']['sortlist']:
if (!empty($this-params['url']['sortlist'])) {
for ( $i=0; $i  count($this-params['url']['sortlist']);
$i++ )
{
$this-Article-id =
$this-params['url']['sortlist'][$i];
$this-Article-saveField('sort', $i);
}
}

hope this helped,

f.


--~--~-~--~~~---~--~~
 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: Ant and SVN

2006-11-09 Thread teemow

i'm using the cli client in ant:

target name=svn description=
echo message=Export the new application... /
exec executable=svn
arg line=export -q ${SVN_URL} ${APP_DIR}/
/exec
echo message=Done! /
/target


--~--~-~--~~~---~--~~
 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: Setting a variable for beforeFilter to catch?

2006-11-09 Thread Ismael S. Kafeltz

Cypher, i think you are right. This should work.

I guess the problem is that you are *extends* the wrong class.
Did you alter the /libs/controllers/app_control.php file? Or you
created a new one in another place?


--~--~-~--~~~---~--~~
 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: User Authentication and User Management

2006-11-09 Thread Ismael S. Kafeltz

It is possible that you are suffering 2 problems:

One solution is here:
http://groups.google.com/group/cake-php/browse_thread/thread/f19fe8d0eecabadb/227f8de5ff37a5ad?lnk=gstq=acmrnum=3#227f8de5ff37a5ad

Second i discovery my self using Beyond Compare, the file db_acl.sql
whitch contain sql script to create the 3 table to use ACL was modified
the attributes name, this means that the new versions will not work
with this ACM anymore.
The ACM man did not work on ACM for months, so don't expect a update so
early. You could use the old script if you wish. ( i don't know where
to download old versions )


--~--~-~--~~~---~--~~
 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: Quest for the holy grail of the cakePHP-Eclipse setups

2006-11-09 Thread Bert Van den Brande

I use the Zend Eclipse ( http://www.zend.com/phpide ).

Since I prefer not to have 1 shared Cake framework for all my projects
I haven't really tested the possibility of defining the Cake framework
as a project and then making my projects dependent on the
Cake-project.
But I've seen some tutorial instructions somewhere on how to do it ...

The Zend Eclipse IDE works pretty good for me with functions and class
lookups, code completion, templates and such ... alltough I still need
to tackle the debugging features.

Haven't really tried some unit testing integration.

On 11/9/06, Adrian Godong [EMAIL PROTECTED] wrote:
 Hi,

 I'm using Eclipse 3.2.0 + PHP plugin from Eclipse (not PHPEclipse)

 Local workspace setup is just like your number 1. I will have one cake lib
 for each project.

 Source control is using CVS. Currently no problem accessing, updating, or
 comitting.

 BTW about test suites, any links on how to use it? It's not stated at all in
 the manual.


 On 11/9/06, Sonic Baker  [EMAIL PROTECTED] wrote:
  There has been some talk on the list about the kinds of editors people use
 for cakePHP development. Some people have mentioned Eclipse (among others)
 for a good all round IDE. I personally have been using both 'kate' and
 'Quanta' (built on top of kate) for my cakePHP development and while I have
 no real complaints, these would probably fall in the category of Editors
 rather than IDE's. So, in my continuing quest to become ever more efficient,
 and taking into account that there was a mention of EasyEclipse, I've
 decided to give it a shot and see what advantages an IDE like Eclipse has to
 offer. One other reason for going with Eclipse over others is the fact that
 it's open source.
  However, I'm pretty much a total noob at Eclipse and although the nice
 people over at EasyEclipse have made it easier to get you up and running,
 managing cake projects is not as obvious as it would first seem.
 
  Some of the things I'd like to get out of eclipse are:
  (1) Integration with the cakePHP test suite
  - At present it works with SimpleTest but how would the cakePHP
 version sit with it?
 
  (2) Integration with subversion
 
  (3) Integration with the cakePHP itself
 
  The first thing that struck me was where to start a workspace and where to
 start a project?
 
  Presently I'm using the trunk core checkout from the subversion repository
 and so my directory structure is:
 
  /var/www/workspace/cake/1.x.x.x/app
 
  I thought this way I could keep all my cake projects within the same
 workspace. So I defined my workspace as '/var/www/workspace' hoping to
 create a project in 'cake/1.x.x.x/project_name'.
  This gives me the error:
  'Project contents cannot be inside workspace directory'
  Wah
 
  From talking to the guys over on the EasyEclipse IRC channel I've
 discovered that this kind of layout will not be possible till the soon to be
 released 1.2 version.
 
  However, since others here are already using Eclipse it makes me think
 that perhaps I'm going about it the wrong way altogether. Talking to our own
 guys on the #cakephp IRC channel I've found two alternatives.
 
  (1) Put the entire cake core in a project of it's own, so you would have
 '/var/www/workspace/project1'. The 'project1' directory would contain the
 entire cake framework and of course your 'app' directory. However, if I
 wanted to create a second cakePHP project I would have to make 'project1'
 which would also contain the entire framework and would not allow me to
 share my cakePHP core across multiple projects.
 
  (2)  Edit app/webroot/index.php and move the cake core to the root of the
 workspace. So I'd have '/projects/cake', '/projects/app1', and
 '/projects/app2'. In order to deploy this to the server I'd have to either
 use the same directory structure on the server, or use a second branch for
 the live application.
 
  Another thing that struck me was using subversion with eclipse. Usually,
 when using svn you import your new project, delete the old one and check a
 working copy out from the repository. So with Eclipse, I create a project
 (which creates the '.project' file), maybe bake or copy in my 'app'
 directory, check it into the repo, delete the whole lot and then check a wc
 out of the repo again. This seems like and awful waste to me. How do you do
 it?
  To all Eclipse users out there:
  How do you have your Eclipse setup working with cakePHP? Have you
 integrated the test suite? How do you handle Subversion?
 
  As I'm new to Eclipse, I'm sure there are tons of stuff I'm missing here.
 If you point me in the right direction of even one of them I'd be very
 greatfull.
 
  Cheers,
 
  Sonic
 
 
 



 --
 Adrian Godong
 [EMAIL PROTECTED]

 Microsoft Student Ambassador

  


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

Re: Setting a variable for beforeFilter to catch?

2006-11-09 Thread Bert Van den Brande

I think defining locked as a class instance var inside AppController
should solve the warning ?

On 11/9/06, Ismael S. Kafeltz [EMAIL PROTECTED] wrote:

 Cypher, i think you are right. This should work.

 I guess the problem is that you are *extends* the wrong class.
 Did you alter the /libs/controllers/app_control.php file? Or you
 created a new one in another place?


 


--~--~-~--~~~---~--~~
 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: Quest for the holy grail of the cakePHP-Eclipse setups

2006-11-09 Thread Kjell Bublitz
I've tried to get a perfect plugin-set for eclipse and i was focused on having JSEclipse included, but unfortunatly the CSS support is rather poor on eclipse (there was a really good plugin but seems to be discontinued). I have tried to use the PHPEclipse but the code completion, especially how it sets the braces, is annoying. So i tried other plugins for php with more or less success (they either broke another plugin or just sucked)..
I came to the conclusion that there is no way to get a eclipse setup which supports CSS, HTML, PHP and JS using the best plugins available for each job. The main problem is, that the good plugins always try to do something beside their main theme.. like: a PHP plugin tries to provide highlighting for JS, and so does the HTML plugin, and both dont care about the JS Plugin we wanted to stick with in the first place. You end up with a broken setup and wasting hours and hours..
It would be great if some plugins wouldnt try to be an all in one solution. PS: Eclipse really needs a good CSS plugin. There isn't any.. (for free)[OT]After all the tinkering i went back to PHPEdit from Waterproof. Has many options to play with and comes with code-beautifier, help generators and alot of handy text tools. I am also currently evaluating PHPDesigner which looks really promising (its damn small too!). I also tried Zend Studio, which has built-in SVN, but Zend is too much of PHP in my opinion. We need more then just that. Also Zends interface is too static. I like my tab-bars on the top 
f.ex.[/OT]On 11/9/06, Bert Van den Brande [EMAIL PROTECTED] wrote:
I use the Zend Eclipse ( http://www.zend.com/phpide ).Since I prefer not to have 1 shared Cake framework for all my projectsI haven't really tested the possibility of defining the Cake framework
as a project and then making my projects dependent on theCake-project.But I've seen some tutorial instructions somewhere on how to do it ...The Zend Eclipse IDE works pretty good for me with functions and class
lookups, code completion, templates and such ... alltough I still needto tackle the debugging features.Haven't really tried some unit testing integration.On 11/9/06, Adrian Godong 
[EMAIL PROTECTED] wrote: Hi, I'm using Eclipse 3.2.0 + PHP plugin from Eclipse (not PHPEclipse) Local workspace setup is just like your number 1. I will have one cake lib
 for each project. Source control is using CVS. Currently no problem accessing, updating, or comitting. BTW about test suites, any links on how to use it? It's not stated at all in
 the manual. On 11/9/06, Sonic Baker  [EMAIL PROTECTED] wrote:  There has been some talk on the list about the kinds of editors people use
 for cakePHP development. Some people have mentioned Eclipse (among others) for a good all round IDE. I personally have been using both 'kate' and 'Quanta' (built on top of kate) for my cakePHP development and while I have
 no real complaints, these would probably fall in the category of Editors rather than IDE's. So, in my continuing quest to become ever more efficient, and taking into account that there was a mention of EasyEclipse, I've
 decided to give it a shot and see what advantages an IDE like Eclipse has to offer. One other reason for going with Eclipse over others is the fact that it's open source.  However, I'm pretty much a total noob at Eclipse and although the nice
 people over at EasyEclipse have made it easier to get you up and running, managing cake projects is not as obvious as it would first seem.   Some of the things I'd like to get out of eclipse are:
  (1) Integration with the cakePHP test suite  - At present it works with SimpleTest but how would the cakePHP version sit with it?   (2) Integration with subversion
   (3) Integration with the cakePHP itself   The first thing that struck me was where to start a workspace and where to start a project?   Presently I'm using the trunk core checkout from the subversion repository
 and so my directory structure is:   /var/www/workspace/cake/1.x.x.x/app   I thought this way I could keep all my cake projects within the same workspace. So I defined my workspace as '/var/www/workspace' hoping to
 create a project in 'cake/1.x.x.x/project_name'.  This gives me the error:  'Project contents cannot be inside workspace directory'  Wah   From talking to the guys over on the EasyEclipse IRC channel I've
 discovered that this kind of layout will not be possible till the soon to be released 1.2 version.   However, since others here are already using Eclipse it makes me think that perhaps I'm going about it the wrong way altogether. Talking to our own
 guys on the #cakephp IRC channel I've found two alternatives.   (1) Put the entire cake core in a project of it's own, so you would have '/var/www/workspace/project1'. The 'project1' directory would contain the
 entire cake framework and of course your 'app' directory. However, if I wanted to create a second cakePHP project I would have to make 'project1' which would also contain 

Re: Setting a variable for beforeFilter to catch?

2006-11-09 Thread themanfrombucharest

If I understood your explanation right then this is what happens:
the beforeFilter() method gets called before your action method so
$this-locked isn't set yet!
you could try to have a special class var for your controller that
stores the locked actions:

class EntriesController extends AppController {
var $locked = array('write', 'etc');
}

and then:

class AppController extends Controller {
function beforeFilter() {
if (isset($this-locked[$this-action])) {
//do your thing
}
}
}

On Nov 9, 1:39 pm, Bert Van den Brande [EMAIL PROTECTED] wrote:
 I think defining locked as a class instance var inside AppController
 should solve the warning ?

 On 11/9/06, Ismael S. Kafeltz [EMAIL PROTECTED] wrote:



  Cypher, i think you are right. This should work.

  I guess the problem is that you are *extends* the wrong class.
  Did you alter the /libs/controllers/app_control.php file? Or you
  created a new one in another place?


--~--~-~--~~~---~--~~
 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 use $ajax-sortable and update in a db?

2006-11-09 Thread Eric

Thanks for your patient!
BUT i am confused where should I put the submit_sort?
Creat a new js file? or PUT them in the index.thtml?
I was created a new function in my controlloer called submit_sort( ),
and paste your code. It was wrongl

THanks.
Asking so silly question.


f. wrote:
 Hi,

  Should I creat a field called order in my, such as topics table?
 

 Yes, you should.
 What worked for me:


 In my view, I have a div with the sortable items:
 div id=sortlist
 ?php foreach ($data as $data): ?
 div id=artdiv_?php echo $data['Article']['id']; ?
 class=sortablediv
 pwhatever.../p
 /div
 ?php endforeach; ?
 /div

 I create the sortable js-code with

 ?php echo $ajax-sortable('sortlist', array(
 'tag'   = 'div',
 'onUpdate'  =
 'submit_sort'
 )); ?
 You need to define the function to submit the data:
 script type=text/javascript charset=utf-8
 function submit_sort() {
 var u = new Ajax.Updater('col4', /* i update a div with the
 results,,, */
 '?php echo
 $html-url('/admin/articles/sort/'.$catid).'?' ?' +
 Sortable.serialize('sortlist'),
 {

 onLoading:function(request){$('indicator').show()},

 onLoaded:function(request){$('indicator').hide()},
 asynchronous:true,
 evalScripts:true,
 requestHeaders:['X-Update', 'col4']
 }, false);
 }
 /script
 the important part is to append the serialized list to the URL.
 Later in your controller you can access the data with
 $this-params['url']['sortlist']:
 if (!empty($this-params['url']['sortlist'])) {
 for ( $i=0; $i  count($this-params['url']['sortlist']);
 $i++ )
 {
 $this-Article-id =
 $this-params['url']['sortlist'][$i];
 $this-Article-saveField('sort', $i);
 }
 }
 
 hope this helped,
 
 f.


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



Baking unit tests does not use inflections?

2006-11-09 Thread Synchro

I noticed while baking a classic 'status' model, that it creates tests
for 'statu', even though I have entries filled in for status =
statuses in several places in inflections.php (and the model baking
itself seems to use it). Is this a bug in bake?


--~--~-~--~~~---~--~~
 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: Problems connecting to MySQL 4.1 on PHP 5.1.1 using IIS 6

2006-11-09 Thread mariano.iglesias

I'm sorry but this is completely out of scope for the purpose of this
group. [EMAIL PROTECTED] is for handling messages *REGARDING*
CakePHP development, not just general PHP. There are other groups for
that.

Furthermore, a very basic google search would yield results:

http://www.google.com.ar/search?hl=esq=mysql+4+php+5+iis+6+connection+problemmeta=

Next time please DO SEARCH for yourself, and if you don't find anything
DROP YOUR MESSAGE on the appropiate group.


--~--~-~--~~~---~--~~
 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 use $ajax-sortable and update in a db?

2006-11-09 Thread f.

 BUT i am confused where should I put the submit_sort?
 Creat a new js file? or PUT them in the index.thtml?
 I was created a new function in my controlloer called submit_sort( ),
 and paste your code. It was wrongl

I put in my view (note the wrapping script)
It is plain Javascript. There might be more elegant ways to do it, or
more generic, but basically thats it. Use Firefox for development,
there is a very nice extension called firebug, which shows headers and
responses to ajax-calls, amongst others...

greets,

f.


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



Sites Powered by CakePHP

2006-11-09 Thread Mandy

Hi,

I haven't been able to find a page on cakephp.org that lists all the
sites powered by cakephp.

I believe in this framework and use it for a lot of my projects, but
some of my clients want to know the biggest applications that this
framework is supporting / capable of supporting.

For their satisfaction, can someone point me to some sites (maybe
social networking or blogging, etc) that are running on cake?

Thanks in advance,
Mandy


--~--~-~--~~~---~--~~
 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: Problems connecting to MySQL 4.1 on PHP 5.1.1 using IIS 6

2006-11-09 Thread Matt

Database host is set as localhost, exactly the same setting as used in
the when doing vanilla mysql_connect which works fine.


--~--~-~--~~~---~--~~
 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: Sites Powered by CakePHP

2006-11-09 Thread nate

Here are a couple that I know of:
http://www.pewterreport.com/
http://villagevoice.com/bestof/2006/


--~--~-~--~~~---~--~~
 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: Ant and SVN

2006-11-09 Thread hydra12

That worked great!  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: access to $HTTP_RAW_POST_DATA

2006-11-09 Thread zheka

this worked.

thank you very much


--~--~-~--~~~---~--~~
 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: Quest for the holy grail of the cakePHP-Eclipse setups

2006-11-09 Thread hydra12

I'm using Eclipse SDK 3.1.2 with PHPEclipse 1.1.8 and Subclipse 1.0.3,
and I'm playing with ant integration.  Here's how my setup works right
now:

My workspace is at c:\web\projects.  Inside c:\web\projects, I have a
cake folder with my default cake install.  I made it a project just so
I could easily get to the source code when I need it.  I prefer to have
one cake install that works with all my apps, so when I start a new
project, I put it in c:\web\projects, not in c:\web\projects\cake\app.
Then I have to edit my project's webroot/index.php file to fix all my
paths.  This works well for me, since I tend to have several different
apps on the same server, and I'd rather just have one cake core.

As for svn, after I create a project, I right-click on it and go to
team-share project to add it to my svn repository.  Since I'm the only
developer, I don't ever delete my project and pull a fresh copy from
the repository unless I really mess something up.

Future plans - I'm learning ant right now, mostly focused on deploying
my finished apps.  I may try to use it for starting a new project, too
- have it change the paths in webroot/index.php for me or something.

I'm also a member of the IDE Plugins and Enhancements project on
cakeforge.  I'm making eclipse templates (similar to textmate snippets)
for that.

I hope that helps some.

hydra12


--~--~-~--~~~---~--~~
 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: Quest for the holy grail of the cakePHP-Eclipse setups

2006-11-09 Thread Adrian Godong

I just tried your link and it seems that the PHP IDE plugin hosted on
eclipse.org IS the Zend PHP IDE for Eclipse.

I'm sorry for the confusion created from my previous mail.

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Bert Van den Brande
Sent: 09 Nopember 2006 18:36
To: cake-php@googlegroups.com
Subject: Re: Quest for the holy grail of the cakePHP-Eclipse setups


I use the Zend Eclipse ( http://www.zend.com/phpide ).

Since I prefer not to have 1 shared Cake framework for all my projects
I haven't really tested the possibility of defining the Cake framework
as a project and then making my projects dependent on the
Cake-project.
But I've seen some tutorial instructions somewhere on how to do it ...

The Zend Eclipse IDE works pretty good for me with functions and class
lookups, code completion, templates and such ... alltough I still need
to tackle the debugging features.

Haven't really tried some unit testing integration.

On 11/9/06, Adrian Godong [EMAIL PROTECTED] wrote:
 Hi,

 I'm using Eclipse 3.2.0 + PHP plugin from Eclipse (not PHPEclipse)

 Local workspace setup is just like your number 1. I will have one cake lib
 for each project.

 Source control is using CVS. Currently no problem accessing, updating, or
 comitting.

 BTW about test suites, any links on how to use it? It's not stated at all
in
 the manual.


 On 11/9/06, Sonic Baker  [EMAIL PROTECTED] wrote:
  There has been some talk on the list about the kinds of editors people
use
 for cakePHP development. Some people have mentioned Eclipse (among others)
 for a good all round IDE. I personally have been using both 'kate' and
 'Quanta' (built on top of kate) for my cakePHP development and while I
have
 no real complaints, these would probably fall in the category of Editors
 rather than IDE's. So, in my continuing quest to become ever more
efficient,
 and taking into account that there was a mention of EasyEclipse, I've
 decided to give it a shot and see what advantages an IDE like Eclipse has
to
 offer. One other reason for going with Eclipse over others is the fact
that
 it's open source.
  However, I'm pretty much a total noob at Eclipse and although the nice
 people over at EasyEclipse have made it easier to get you up and running,
 managing cake projects is not as obvious as it would first seem.
 
  Some of the things I'd like to get out of eclipse are:
  (1) Integration with the cakePHP test suite
  - At present it works with SimpleTest but how would the cakePHP
 version sit with it?
 
  (2) Integration with subversion
 
  (3) Integration with the cakePHP itself
 
  The first thing that struck me was where to start a workspace and where
to
 start a project?
 
  Presently I'm using the trunk core checkout from the subversion
repository
 and so my directory structure is:
 
  /var/www/workspace/cake/1.x.x.x/app
 
  I thought this way I could keep all my cake projects within the same
 workspace. So I defined my workspace as '/var/www/workspace' hoping to
 create a project in 'cake/1.x.x.x/project_name'.
  This gives me the error:
  'Project contents cannot be inside workspace directory'
  Wah
 
  From talking to the guys over on the EasyEclipse IRC channel I've
 discovered that this kind of layout will not be possible till the soon to
be
 released 1.2 version.
 
  However, since others here are already using Eclipse it makes me think
 that perhaps I'm going about it the wrong way altogether. Talking to our
own
 guys on the #cakephp IRC channel I've found two alternatives.
 
  (1) Put the entire cake core in a project of it's own, so you would have
 '/var/www/workspace/project1'. The 'project1' directory would contain the
 entire cake framework and of course your 'app' directory. However, if I
 wanted to create a second cakePHP project I would have to make 'project1'
 which would also contain the entire framework and would not allow me to
 share my cakePHP core across multiple projects.
 
  (2)  Edit app/webroot/index.php and move the cake core to the root of
the
 workspace. So I'd have '/projects/cake', '/projects/app1', and
 '/projects/app2'. In order to deploy this to the server I'd have to either
 use the same directory structure on the server, or use a second branch for
 the live application.
 
  Another thing that struck me was using subversion with eclipse. Usually,
 when using svn you import your new project, delete the old one and check a
 working copy out from the repository. So with Eclipse, I create a project
 (which creates the '.project' file), maybe bake or copy in my 'app'
 directory, check it into the repo, delete the whole lot and then check a
wc
 out of the repo again. This seems like and awful waste to me. How do you
do
 it?
  To all Eclipse users out there:
  How do you have your Eclipse setup working with cakePHP? Have you
 integrated the test suite? How do you handle Subversion?
 
  As I'm new to Eclipse, I'm sure there are tons of stuff I'm missing

Re: How to use $ajax-sortable and update in a db?

2006-11-09 Thread purepear

Damn...i did it... i was playing with
$ajax-sortable('items',array('url' = '/items/order')) ... for example
I use firebug to catch the request -  the parameters are wrong... it
seems that they are not in UTF-8.

The ajax helper generates js that prints  
parameters:sortable.serialize('items') 
Instead use sth. like :
?= $ajax-sortable('items',array('onUpdate' =  function(t){new
Ajax.Request( '/items/order', {method:'post',
postBody:Sortable.serialize('items'), asynchronous:true})}))?

If you wish you can fix the ajaxhelper instead of writing that js every
time.

And the function that catches that request :

function order(){
  $ids= $this-params['form']['items'];
  $i = 1;
  foreach($ids as $id){
$this-Item-id = $id;
$this-Item-saveField('position', $i++);
}

note: Your 'items' db table must have 'position' field
Hope i helped :)


--~--~-~--~~~---~--~~
 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 use $ajax-sortable and update in a db?

2006-11-09 Thread purepear

So... in short :
___  VIEW ( index.thtml )  __

ul id=items
  ?foreach($items as $item){?
li id=item_?= $item['Item']['id']??=
$item['Item']['title']?/li
  ?}?
/ul

 ?= $ajax-sortable('items',array('onUpdate' =  function(t){new
Ajax.Request( '/items/order', {method:'post',
postBody:Sortable.serialize('items'), asynchronous:true})}))?

 CONTROLLER ( items_controller.php ) 

function order(){
  $ids= $this-params['form']['items'];
  $i = 1;
  foreach($ids as $id){
$this-Item-id = $id;
$this-Item-saveField('position', $i++);

}

___ DATABASE __
table 'items' which has field called 'position'



I'm not using Items in my source, so there might be some mistakes, but
thats the main idea :)


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



Default controller?

2006-11-09 Thread Erich C. Beyrent

Silly newbie question here.  I have followed the instructions in the 
manual to set up a default index page, with a new default.thtml layout, 
which echoes $content_for_layout.

What I would like to know is where does $content_for_layout get set?  Is 
there a default controller that gets called before anything else?  I ask 
because I want to set up some objects and stuff them into the sessions 
so that other controllers can access them.

What's the best way to accomplish this?

-Erich-

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



login/logout - module

2006-11-09 Thread dme69

Hello all,

I'm quite new to cakephp and i want to know if there is a module to add
a login/logout function tp my application ?

Thanks for your help.

Dominique.


--~--~-~--~~~---~--~~
 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: Default controller?

2006-11-09 Thread John David Anderson (_psychic_)


On Nov 9, 2006, at 10:00 AM, Erich C. Beyrent wrote:


 Silly newbie question here.  I have followed the instructions in the
 manual to set up a default index page, with a new default.thtml  
 layout,
 which echoes $content_for_layout.

 What I would like to know is where does $content_for_layout get set?

In the core: its the place where the view code gets spit into.

 Is
 there a default controller that gets called before anything else?

Not really, though all your controllers extend AppController.

   I ask because I want to set up some objects and stuff them into  
 the sessions
 so that other controllers can access them.

 What's the best way to accomplish this?

I'd stick that sort of stuff in AppController (/app/ 
app_controller.php) as class variables or methods, or in /app/config/ 
bootstrap.php.

-- John

--~--~-~--~~~---~--~~
 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: Sites Powered by CakePHP

2006-11-09 Thread Mikee Freedom

There is a list of sites in the wiki somewhere as well.
mikee

On 10/11/06, nate [EMAIL PROTECTED] wrote:

 Here are a couple that I know of:
 http://www.pewterreport.com/
 http://villagevoice.com/bestof/2006/


 


--~--~-~--~~~---~--~~
 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: A strange but very critical bug in my app using cake ajax

2006-11-09 Thread PD

AD7six,

Thanks for your response. I checked the code. I am still not able to
solve this. Because this is happening when I edit a category also. If,
as you said, my existing category is being overwritten, then while
editing, I should end up in 2 categories with the same name. But what
happens is that I loose one. And the category I loose is not
necessarily the one I edited. Usually its not. So what you said would
only apply to adding a new category.

The category list page is completely Ajax. There is a list of all
categories on this page. When you click edit on any category, The view
changes to edit form for that category. Then when you save, the edit
form disappears and the view mode of that category appears again with
the changed data. It is during this operation where I loose the
category.

Thanks again for your reply.


--~--~-~--~~~---~--~~
 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: login/logout - module

2006-11-09 Thread mariano.iglesias

Dominique,

This topic has been covered several times on this group. Try searching
for authentication, login, all words related. For example:

http://groups.google.com/group/cake-php/search?group=cake-phpq=authenticationqt_g=1

You will see it yields quite a number of related topics. Allways try to
search for an answer before posting a question.

Furthermore, cake's bakery have some modules used to help you get
started with authentication:

* obAuth Simple Authentication:
http://bakery.cakephp.org/articles/view/130
* Challenge Response Authentication with Fallback:
http://bakery.cakephp.org/articles/view/128
* Tutorial on obAuth: http://bakery.cakephp.org/articles/view/121


-MI


--~--~-~--~~~---~--~~
 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 use $ajax-sortable and update in a db?

2006-11-09 Thread Petr Vytlačil

I tested your code but it isnt go. Ther is my code:
--

SQL Table:
===
name_tabel: section
id: int
name: varchar
position: int

Section Model:
===
?php
class Section extends AppModel {
var $name = 'Section';
}
?

Section Controller:
=
?php
class SectionsController extends AppController {

var $name = 'Sections';
var $uses = 'Section';
var $helpers = array('Html', 'Form', 'Ajax');

function index() {
$this-set('sections', $this-Section-findAll());
}

function order(){
$ids= $this-params['form']['sections'];
$i = 1;
foreach($ids as $id){
$this-Section-id = $id;
$this-Section-saveField('position', $i++);
}
}
}
?
Section Views:
=
INDEX VIEW

ul id=sections
  ?foreach($sections as $section){?
li id=section_?= $section['Section']['id']?
? echo $section['Section']['name'].' Position:
'.$section['Section']['position']; ?/li
  ?}?
/ul
 ?= $ajax-sortable('sections',array('onUpdate' =  function(t){new
Ajax.Request( '/sections/order', {method:'post',
postBody:Sortable.serialize('sections'), asynchronous:true})}))?

I test it with FireBag in Firefox v2, when I resort some section. Its
return dont finde controller becouse it finding method order on link
http://localhost/sections/order. So when I change: ?=
$ajax-sortable('sections',array('onUpdate' =  function(t){new
Ajax.Request( '/sections/order', {method:'post',
postBody:Sortable.serialize('sections'), asynchronous:true})}))?
on
?= $ajax-sortable('sections',array('onUpdate' =  function(t){new
Ajax.Request( 'http://localhost/zakazky/eshop/sections/order',
{method:'post',
postBody:Sortable.serialize('sections'), asynchronous:true})}))?

its return isnt view for method order, but position section is save.

THX


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



making cake sql-function-aware?

2006-11-09 Thread sbarre


I've been digging around in the archives with searches and I've come
across a few people who have this problem, namely dealing with the
CakePHP saving routines that aren't DB-keyword-aware..

By this I mean the quoting of NULL and the inability to use functions
like PASSWORD() and other database functions.

I appreciate that there are PHP-specific solutions to the PASSWORD()
problem but I would like my MySQL data to be a bit more portable than
that, and not rely on business-logic-level methods to operate on.

I would also like to have a more generic solution that is future-proof
in case I want to use other MySQL functions in the future (which I can
abstract if necessary)..

So I'm wondering if anyone out there has come up with solutions for
this problem?  I know that phpMyAdmin just maintains an array of MySQL
keywords and method names so it can intelligently quote..  This is also
the approach I took in a previous project..

It would involve patching the value() method in the appropriate
DboSource subclass (dbo_mysqli in my case)..

The sloppy solution I can thin of is to stick a call in beforeSave()
that does an execute() call to retrieve a SELECT call with the password
and then stick that in there..  but why use up another query if it can
be avoided..

thoughts?


--~--~-~--~~~---~--~~
 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: making cake sql-function-aware?

2006-11-09 Thread Chris Hartjes

On 11/9/06, sbarre [EMAIL PROTECTED] wrote:


 I've been digging around in the archives with searches and I've come
 across a few people who have this problem, namely dealing with the
 CakePHP saving routines that aren't DB-keyword-aware..

 By this I mean the quoting of NULL and the inability to use functions
 like PASSWORD() and other database functions.

 I appreciate that there are PHP-specific solutions to the PASSWORD()
 problem but I would like my MySQL data to be a bit more portable than
 that, and not rely on business-logic-level methods to operate on.

Well, if you start using MySQL-specific function calls then you've
pretty much guaranteed that you can't ever move your data to another
database like PostgreSQL or Oracle or whatever without a lot of major
work.

Being a path-of-least-resistance guy I'd rather go with custom SQL
than monkey around with patches to the model class.  Besides, you can
always create your own models that use the MySQL functions themselves
and return data in a format you can easily manipuate.

Maybe not the answer you were hoping for, but I hope it helps.  It has
been my experience that once you tie yourself to a particular database
server you can never go back.




-- 
Chris Hartjes

The greatest inefficiencies come from solving problems you will never have.
-- Rasmus Lerdorf

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



Re: login/logout - module

2006-11-09 Thread dme69

Thanks for your answer and ... Sorry.

On 9 nov, 21:25, mariano.iglesias [EMAIL PROTECTED]
wrote:
 Dominique,

 This topic has been covered several times on this group. Try searching
 for authentication, login, all words related. For example:

 http://groups.google.com/group/cake-php/search?group=cake-phpq=authe...

 You will see it yields quite a number of related topics. Allways try to
 search for an answer before posting a question.

 Furthermore, cake's bakery have some modules used to help you get
 started with authentication:

 * obAuth Simple Authentication:http://bakery.cakephp.org/articles/view/130
 * Challenge Response Authentication with 
 Fallback:http://bakery.cakephp.org/articles/view/128
 * Tutorial on obAuth:http://bakery.cakephp.org/articles/view/121
 
 -MI


--~--~-~--~~~---~--~~
 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 use $ajax-sortable and update in a db?

2006-11-09 Thread Petr Vytlačil

One question, how I can do sorting in two dimensions. Now its go only
in vertical dimension.


--~--~-~--~~~---~--~~
 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: login/logout - module

2006-11-09 Thread Mariano Iglesias

No problem.

Glad to be of assistance.

-MI

-Mensaje original-
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de dme69
Enviado el: Jueves, 09 de Noviembre de 2006 06:15 p.m.
Para: Cake PHP
Asunto: Re: login/logout - module

Thanks for your answer and ... Sorry.



--~--~-~--~~~---~--~~
 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: dynamic table names in wordpress

2006-11-09 Thread mozey

unfortunat. But, it sure did help. thank you.


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



[noobie] generateList()

2006-11-09 Thread Christoph

Ok, so I figured out how to generate a SELECT list using different
fields, other than the id, as the key = value pair.  But I still have
some issues.

* Is it possible to use multiple fields to make up the value of the
select box?  Such that it would come out looking something like

option value='field1value'field2value - field3value/option

?

* I have 4 seperate tables.  sets, games_sets, game_pieces and
collections.  collections has a FK referencing game_pieces which has a
FK referencing games_sets which has a FK referencing sets.  So yay.
The following are the associated models follows by the associates
controllers (only the relevant parts; everything else is cut out):

class Collection extends AppModel {
var $name = 'Collection';
var $hasMany = array(
'GamePiece' =
array('className' = 'GamePiece',
'foreignKey' = 'game_piece_id' 
));
}

class CollectionsController extends AppController {
var $name = 'Collections';
var $uses = array('Collection', 'User', 'GamePiece');
}

class GamePiece extends AppModel {
var $name = 'GamePiece';
var $belongsTo = array(
'GamesSet' =
array('className' = 'GamesSet',
'foreignKey' = 'games_set_id',
'conditions' = '',
'fields' = '',
'order' = '',
'counterCache' = ''
),

'Collection' =
array('className' = 'Collection',
'foreignKey' = 'id',
'conditions' = '',
'fields' = '',
'order' = '',
'counterCache' = ''
));
}

class GamePiecesController extends AppController {
var $name = 'GamePieces';
var $uses = array('GamePiece', 'GamesSet', 'Collection', 'DeckPart',
'TradeGamePiece', 'GamePieceAttribute');
}

class GamesSet extends AppModel {
var $name = 'GamesSet';
var $belongsTo = array(
'Set' =
array('className' = 'Set',
'foreignKey' = 'set_id',
'conditions' = '',
'fields' = '',
'order' = '',
'counterCache' = ''
)

);

var $hasMany = array(
'GamePiece' =
array('className' = 'GamePiece',
'foreignKey' = 
'games_set_id'));

}

class GamesSetsController extends AppController {
var $name = 'GamesSets';
var $uses = array('GamesSet', 'Game', 'Set', 'GamePiece');
}

class Set extends AppModel {
var $name = 'Set';
var $hasMany = array(
'GamesSet' =
array('className' = 'GamesSet',
'foreignKey' = 'set_id'));

}

class SetsController extends AppController {
var $name = 'Sets';
var $uses = array('Set', 'GamesSet');
}

I'm trying to make it so that the collection controller can, going
through game_pieces, games_sets and finally sets, get the set name that
a game piece belongs to.  I'm trying to do something like:

$this-set('gamePieces',
$this-Collection-GamePiece-generateList(NULL,NULL,15,
'{n}.GamePiece.id', '{n}.Set.set_name ));

but that's not working.  Is something like this possible?  Or am I
going to have to generate the SELECT box manually?

thnx,
Christoph


--~--~-~--~~~---~--~~
 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: dynamic table names in wordpress

2006-11-09 Thread [EMAIL PROTECTED]

HmmCan't he change the $useTable variable to reflect the name of
the table he is working with? Or does that var have to be set before
the class is loaded?

On Nov 9, 5:08 pm, mozey [EMAIL PROTECTED] wrote:
 unfortunat. But, it sure did help. thank you.


--~--~-~--~~~---~--~~
 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: Default controller?

2006-11-09 Thread Christoph

 What's the best way to accomplish this?I'd stick that sort of stuff in 
 AppController (/app/
 app_controller.php) as class variables or methods, or in /app/config/
 bootstrap.php.

What's the controller that's using the view

webroot/views/pages/home.thtml

?

There are other models/controllers that I would like to use on my home
page.  News, for example.  Is there any way to do this?  Or am I going
to have to set up my own HomePageController and set up index.php to
redirect to /homepage?

thnx,
Christoph


--~--~-~--~~~---~--~~
 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: Sites Powered by CakePHP

2006-11-09 Thread emiliano

Search in google Powered by CakePHP

On 9 nov, 15:25, Mikee Freedom [EMAIL PROTECTED] wrote:
 There is a list of sites in the wiki somewhere as well.
 mikee

 On 10/11/06, nate [EMAIL PROTECTED] wrote:



  Here are a couple that I know of:
 http://www.pewterreport.com/
 http://villagevoice.com/bestof/2006/


--~--~-~--~~~---~--~~
 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: Problems connecting to MySQL 4.1 on PHP 5.1.1 using IIS 6

2006-11-09 Thread Matt

Disregard this thread, the cause of the problem was a small typo.


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



Why so slow???

2006-11-09 Thread [EMAIL PROTECTED]

Why does it sometimes take 12+ hours for a post to show up in a
discussion? And other times (rarely) it shows up within minutes.

sc


--~--~-~--~~~---~--~~
 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: dynamic table names in wordpress

2006-11-09 Thread georgeL

wp mu is just changeing the prefix of the tables. you can also set the
table prefix inside cake somewhere. maybe this is a possible way


--~--~-~--~~~---~--~~
 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: Why so slow???

2006-11-09 Thread Olivier Percebois-Garve

Hi. I also use gmail and never experienced such trouble.
Keep in mind that are not receiving the email that you are sending,
but the answers.

Olivvv


[EMAIL PROTECTED] wrote:
 Why does it sometimes take 12+ hours for a post to show up in a
 discussion? And other times (rarely) it shows up within minutes.

 sc


 

   


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



How to go about RoR-style Controller::flash

2006-11-09 Thread james revillini

If you haven't seen the RoR Screencast: Creating a blog in 15 minutes
with Ruby on Rails, check it out so you have some context to what I'm
asking about here:
http://media.rubyonrails.org/video/rails_take2_with_sound.mov

Now that you've seen how the flash method works within the RoR
controller, I ask: how do I make mine function in that fashion.

The built-in flash layout and controller method in Cake essentially
goes to a blank page, shows the message, then redirects to wherever you
specify.

The RoR flash method seems to put the message at the top of the page
you've redirected to.

Here's my real-world scenario.  I'm building a wiki.  The user is on
the home page.  They click a Login link at the top of the page.  They
redirect to the login form.  They enter credentials.  I need to say
something at the end of the login action that says 'go back to the home
page and flash this message on the screen.'

Can anyone give me a suggestion on that?

Part 2 of my question:
I want to make the message have something to draw attention to it, so
the user will be encouraged to read it, but then have it become more
subtle.  Ta-da list does this.  When I click 'Add' to add my new item
to the list, it adds itself to the list with a yellow background, then
fades out to white.  I want to do the same thing.  I assume that I
would just do this using a library like scriptaculous or Yahoo UI
Library, but if Cake has some built-in way of achieving that, I'd like
to hear about it.

Thanks for reading my long question!  Peace.


--~--~-~--~~~---~--~~
 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 go about RoR-style Controller::flash

2006-11-09 Thread Samuel DeVore
Actually there is something similarin the controller at the end of the method calling path can do this$this-Session-setFlash('The Role has been saved'); see 
http://api.cakephp.org/class_session_component.html#75c36eab6a62904b4378978cf72a307e you can also define layouts for thisthen somewhere in your layouts (like the default) you can add ?php if ($session-check('
Message.flash')) {  $session-flash(); }?It's how the default app is set up now and what you get if you use bake.phpenjoy
Sam DOn 11/9/06, james revillini [EMAIL PROTECTED] wrote:
If you haven't seen the RoR Screencast: Creating a blog in 15 minuteswith Ruby on Rails, check it out so you have some context to what I'masking about here:
http://media.rubyonrails.org/video/rails_take2_with_sound.movNow that you've seen how the flash method works within the RoRcontroller, I ask: how do I make mine function in that fashion.The built-in flash layout and controller method in Cake essentially
goes to a blank page, shows the message, then redirects to wherever youspecify.The RoR flash method seems to put the message at the top of the pageyou've redirected to.Here's my real-world scenario.I'm building a wiki.The user is on
the home page.They click a Login link at the top of the page.Theyredirect to the login form.They enter credentials.I need to saysomething at the end of the login action that says 'go back to the home
page and flash this message on the screen.'Can anyone give me a suggestion on that?Part 2 of my question:I want to make the message have something to draw attention to it, sothe user will be encouraged to read it, but then have it become more
subtle.Ta-da list does this.When I click 'Add' to add my new itemto the list, it adds itself to the list with a yellow background, thenfades out to white.I want to do the same thing.I assume that I
would just do this using a library like scriptaculous or Yahoo UILibrary, but if Cake has some built-in way of achieving that, I'd liketo hear about it.Thanks for reading my long question!Peace.

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


Location of foreign key

2006-11-09 Thread Mikee Freedom

Afternoon all,

This may be a stupid question but I would like to know as it would
make life somewhat simpler at the end of the day.

In a hasOne relationship address:

e.g. User hasOne UserDetail

Where the users table includes core user information and the
user_details table includes additional information (just an example).

Normally I would put the user_id in to the user_details table yes? and
the hasOne association set in the User model would always return the
UserDetail data.

What if I wanted a single table to act as the one to many tables (if
that makes sense). For example:

donations
orders
payments

will be three different methods that a user can pay money on a
particular site I'm working on. Each of these will be using the same
payment gateway which has supplies certain information that I would
like to record. I like to record this in a seperate table in case I
need to switch gateways at any point.

So, I would usually have just the one table, like so:

orders - recording amount paid, and other information
order_gateway_details - recording particular gateway stuff for this order

[bad table names I know but it's late on a friday afternoon]

now i would be forced to create three seperate gateway_details tables.

order_gateway_details
donation_gateway_details
payment_gateway_details

is it acceptable to put the id of the gateway details in to the
orders, donations, and payments table? that way I could record all of
the details in the one table where they belong. yet still reference
them from their respective payment methods.

I would be reversing the relationship I realise - gateway_details
doesn't ever have one donation (etc). but it would make life easier...

this is not cool is it?

penny for your thoughts.

cheers,
mikee

--~--~-~--~~~---~--~~
 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 go about RoR-style Controller::flash

2006-11-09 Thread james revillini

Thanks so much!

Hm, I have used bake but did not notice this feature.

On Nov 9, 10:12 pm, Samuel DeVore [EMAIL PROTECTED] wrote:
 Actually there is something similar

 in the controller at the end of the method calling path can do this

 $this-Session-setFlash('The Role has been saved');
 seehttp://api.cakephp.org/class_session_component.html#75c36eab6a62904b4...
 can also define layouts for this

 then somewhere in your layouts (like the default) you can add

 ?php if ($session-check('Message.flash'))
 {
 $session-flash();
 }
 ?

 It's how the default app is set up now and what you get if you use bake.php

 enjoy

 Sam D
 On 11/9/06, james revillini [EMAIL PROTECTED] wrote:





  If you haven't seen the RoR Screencast: Creating a blog in 15 minutes
  with Ruby on Rails, check it out so you have some context to what I'm
  asking about here:
 http://media.rubyonrails.org/video/rails_take2_with_sound.mov

  Now that you've seen how the flash method works within the RoR
  controller, I ask: how do I make mine function in that fashion.

  The built-in flash layout and controller method in Cake essentially
  goes to a blank page, shows the message, then redirects to wherever you
  specify.

  The RoR flash method seems to put the message at the top of the page
  you've redirected to.

  Here's my real-world scenario.  I'm building a wiki.  The user is on
  the home page.  They click a Login link at the top of the page.  They
  redirect to the login form.  They enter credentials.  I need to say
  something at the end of the login action that says 'go back to the home
  page and flash this message on the screen.'

  Can anyone give me a suggestion on that?

  Part 2 of my question:
  I want to make the message have something to draw attention to it, so
  the user will be encouraged to read it, but then have it become more
  subtle.  Ta-da list does this.  When I click 'Add' to add my new item
  to the list, it adds itself to the list with a yellow background, then
  fades out to white.  I want to do the same thing.  I assume that I
  would just do this using a library like scriptaculous or Yahoo UI
  Library, but if Cake has some built-in way of achieving that, I'd like
  to hear about it.

  Thanks for reading my long question!  Peace.--
 ==
 S. DeVore
 (the old fart) the advice is free, the lack of crankiness will cost you


--~--~-~--~~~---~--~~
 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 go about RoR-style Controller::flash

2006-11-09 Thread Evan

better yet, you can also override AppController::flash()

function flash($message, $redirect_url = null, $key = 'flash')
{
$this-Session-setFlash($message, 'default', array(), $key);

if ($redirect_url != null) {
$this-redirect($redirect_url);
}
}


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



Best practice for CSS

2006-11-09 Thread leamas

I have just started working on CakePHP for a company and I'm trying to
get a hang of it.
However, I cannot seem to get a straight answer from my research about
implementing my own CSS file.

Do I have to overwrite/edit the cake.generic.css file?  Or can I
redirect the url to the CSS to my own?  If so, do I put that in the
controller?

at little help would be greatly appreciated.  And if possible, describe
it as if I were simple.  :)


--~--~-~--~~~---~--~~
 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: User Authentication and User Management

2006-11-09 Thread Dr. Tarique Sani

On 11/9/06, Ismael S. Kafeltz [EMAIL PROTECTED] wrote:
 The ACM man did not work on ACM for months, so don't expect a update so
 early. You could use the old script if you wish. ( i don't know where
 to download old versions )

PhpNut_ has said that he will look into it but I think it is an itch
which we collectively need to scratch.

Anyone willing to collaborate on making ACM work on current release
(should not be too much work)

Cheers
Tarique

-- 
=
PHP Applications for E-Biz: http://www.sanisoft.com
cheeseCake Photoblog: http://cheesecake-photoblog.org
=

--~--~-~--~~~---~--~~
 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: Best practice for CSS

2006-11-09 Thread mariano.iglesias

It's a very simple issue. You shouldn't overwrite / edit the
cake.generic.css file but instead produce your own css file. Let's say
you've created your own styles.css file. Save this file under your
webroot/css directory.

Then, edit your app/views/layout/default.thtml file and in the header
remove any CSS file declaration you won't be using (perhaps cake's
generic CSS) and instead link to your own CSS file, like this:

?php echo $syhtml-css('styles'); ?

Notice how I did not include the .css extension.

-MI


--~--~-~--~~~---~--~~
 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: Best practice for CSS

2006-11-09 Thread mariano.iglesias

Sorry, $syhtml should be $html. I was just using a helper I've extended
from cake's html helper :)

So it should be:

?php echo $html-css('styles'); ?


--~--~-~--~~~---~--~~
 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: Why so slow???

2006-11-09 Thread Evan

i think you only get to see your own post after someone else has
replied to it


--~--~-~--~~~---~--~~
 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: transactions

2006-11-09 Thread Kai Zaunick

Hi Grant,
was just digging into the mysql transaction problem...
It seems if you are using PHP5, you can directly use model-begin,
commit and rollback. Every unknown method of your model is directly
dispatched as a database query (cake uses the __call function to
catch unknown methods).
The more correct way is certainly to use the internal structures which
need to be patched...

Cake is a nice framework, but transactions should have a high priority
on the feature list as they are necessary for complex applications.


Grant Davies wrote:
 I've done some searching and found transactions comes up sometimes but
 there doesn't appear to be a definite answer.

 I found this :

 https://trac.cakephp.org/ticket/832

 And I see that the dbo_mssql.php file has some transaction support in
 it.

 Has anyone tried the patched model with mysql to use transactions ?  I
 have an application that I need transactions for and right now I'm
 having to delete an inserted row if a insert to another table fails.
 
 Thanks
 Grant


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