Re: Plugin Guidelines - Github

2014-06-02 Thread Dakota
Some basic plugin guidelines that I've learned over the years: - Follow the CakePHP coding standard (http://book.cakephp.org/2.0/en/contributing/cakephp-coding-conventions.html) - Make sure you have a readme explaining how to install your plugin - Make sure you have a license for the

Re: 3.0 - Getting variables into anonymous functions

2014-06-02 Thread Dakota
I was on my mobile at the time of posting the reply, otherwise I'd have given you an example as well :) Glad I could help! On Tuesday, 3 June 2014 07:17:58 UTC+2, Reuben wrote: > > Oh, that's handy. As you can see, I've zero experience in anonymous > functions. > > For those at home: > > $name

Re: 3.0 - Getting variables into anonymous functions

2014-06-02 Thread Reuben
Oh, that's handy. As you can see, I've zero experience in anonymous functions. For those at home: $name = 'CakePHP'; $query = $articles->find(); $query->matching('Tags', function($q) use ($name){ return $q->where(['Tags.name' => $name]);}); On Tuesday, 3 June 2014 14:45:14 UTC+10, Dakot

Re: button wont display as it should

2014-06-02 Thread Dakota
In order to have a link appear as a button you need to style it correctly. Do you have a button class is your css? The video you posted is using the default cakephp css file which styles links in a .action div to look like a button. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find

3.0 - Getting variables into anonymous functions

2014-06-02 Thread Dakota
Use the use statement. See http://www.php.net/manual/en/functions.anonymous.php example 3 for an example. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePH

3.0 - Getting variables into anonymous functions

2014-06-02 Thread Dakota
Use the use statement. See http://www.php.net/manual/en/functions.anonymous.php example 3 for an example. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePH

3.0 - Getting variables into anonymous functions

2014-06-02 Thread Reuben
Hi In the example from the CakePHP 3 Book, how would one replace 'CakePHP' with a variable (i.e. $name), and have that passed from the calling code? Would is be via a call back, or property set on the $query, and accessible via $q? $query = $articles->find();$query->matching('Tags', function(

Re: button wont display as it should

2014-06-02 Thread jagguy
No I button not a image link and with a parameter too I need. If you look at this video it has buttons exactly as I am talking about with a html->link and I cant see how it does it. Also my code came from the docs and it doesnt work. https://www.youtube.com/watch?v=zvwQGZ1BxdM --

Plugin Guidelines - Github

2014-06-02 Thread Stephen S
Hey guys I'm not new to CakePHP (1.1) but I'm very interested in contributing to the community and also playing around by creating open source plugins. I've set something up on github which I plan to commit to when I get free time, but what type of advice or guidelines do you suggest for doing th

Re: User table foreign key confusion

2014-06-02 Thread John Andersen
Ok, if your model(s) work, what actually is your question? 1. Have you defined your tables in the database with foreign keys? For example like this: Users table id = primary key name = full name of user username = Username, unique identifier of the user ... Teachers table id = primary key user_i

Re: button wont display as it should

2014-06-02 Thread Paul Willis
According to the docs http://book.cakephp.org/2.0/en/core-libraries/helpers/html.html To create an image link specify the link destination using the url option in $htmlAttributes.: echo $this->Html->image("recipes/6.jpg", array( "alt" => "Brownies", 'url' => array('controller' =

Re: button wont display as it should

2014-06-02 Thread Jeremy Burns : Class Outfit
Then just use CSS. On 2 Jun 2014, at 15:01, jagguy wrote: > Form buttons should not be used as simple links, so this cant be the solution > > http://stackoverflow.com/questions/13491421/cakephp-create-simple-buttons-that-redirects-to-views > > > P: (03) 9866 7737 > E: i...@itfutures.edu.au >

Re: button wont display as it should

2014-06-02 Thread jagguy
Form buttons should not be used as simple links, so this cant be the solution http://stackoverflow.com/questions/13491421/cakephp-create-simple-buttons-that-redirects-to-views -- *P: (03) 9866 7737* *E: i...@itfutures.edu.au * *A: Suite 5 / Level 1 / 424

Re: button wont display as it should

2014-06-02 Thread Jeremy Burns : Class Outfit
Use $this->Form->button... On 2 Jun 2014, at 14:37, jagguy wrote: > Hi, > > I simply want to display a button instead of a link but the button doesnt > appear as I cant override the link display with htmlHelper > In older versions of cake 2.x this does work. > > echo "" .$this->Html->link

button wont display as it should

2014-06-02 Thread jagguy
Hi, I simply want to display a button instead of a link but the button doesnt appear as I cant override the link display with htmlHelper In older versions of cake 2.x this does work. echo "" .$this->Html->link('Edit', array('controller' => 'users', 'action' => 'editteacher/'.$ite