Cake bake all outputs code

2015-05-05 Thread Johan Marchán
I'm using AMPPS with Yosemite for my first CakePHP app. I downloaded CakePHP 3 using the AMPPS installer and the browser successfully renders the default home without any errors or issues. When I try `cake bake all users` (as instructed in CakePHP tutorial) the console outputs the raw code i

Re: Database name with period/dot results in SQL error

2012-09-24 Thread Johan Klinge
> > No, it's on a hosted server and I don´t have permissions to rename the > database (or create a new one). > -- Like Us on FacekBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups

Re: Database name with period/dot results in SQL error

2012-09-21 Thread Johan Klinge
But this seems to mess up my connection and instead I get this error: *Error: *SQLSTATE[42000] [1044] Access denied for user 'XXX'@'YY.YY.YY.%' to database '`XXX.se`' requires a database connection Is there a better place to inject the escaped database name? /Johan -- L

Re: Database name with period/dot results in SQL error

2012-09-21 Thread Johan Klinge
connection and instead I get this error: *Error: *SQLSTATE[42000] [1044] Access denied for user 'XXX'@'YY.YY.YY.%' to database '`XXX.se`' requires a database connection Is there a better place to inject the escaped database name? /Johan Den torsdagen den 20:e sept

Database name with period/dot results in SQL error

2012-09-20 Thread Johan Klinge
d older posts saying that CakePHP does not support database names with reserved characters in them. So: is this still true in CakePHP 2.2.1? And are there any workarounds since I cannot change the database name? Best regards, Johan -- Like Us on FacekBook https://www.facebook.com/CakePH

Re: plugin routing problem

2011-08-02 Thread Johan
ing a connected route in the routes.php file. Cheers, - Johan On Tue, Aug 2, 2011 at 3:54 PM, john lyles wrote: > I'm building a blog plugin for CakePHP. It is called 'blog'. > > I am following the manual on plugin routing but my links won't work. > http://boo

Re: How do I typically migrate a CakePHP app?

2011-07-28 Thread Johan
CakePHP 2.0 is not yet finished. If you migrate now to 2.0 you will probably have to update your site with each release until they get to the stable version. Cheers, - Johan On Fri, Jul 29, 2011 at 1:37 AM, 24z wrote: > Dear group, > > I've just build my first CakePHP app (gpc.fm

Re: Mobile url,, please help!!!!

2011-07-28 Thread Johan
null)); Router::connect('/m/:controller/*', array('action' => 'index', 'prefix' => null)); Router::connect('/m/', array([YOUR MOBILE WEBROOT HERE])); This will redirect all /m/* calls to your original actions through a faux prefix (m).

Re: Problem with Router::connect

2011-07-19 Thread Johan
them in the pages controller. Read more about passing arguments on the Router configuration section of the Cookbook: http://book.cakephp.org/view/948/Defining-Routes Cheers, - Johan On Tue, Jul 19, 2011 at 8:55 AM, heohni < heidi.anselstet...@consultingteam.de> wrote: > Can anyone pl

Re: i18n

2011-07-06 Thread Johan
You can use a third-party tool such as POEdit to scan your sources for i18n strings. You can define which files to scan and what functions to search. Cheers, - Johan On Tue, Jul 5, 2011 at 5:57 PM, Carlos Eduardo Sotelo Pinto < carlos.sotelo.pi...@gmail.com> wrote: > Hi people >

Re: internationalization

2011-07-04 Thread Johan
If you are willing to pay for it, there is a company that translates .po files, among other frameworks: http://www.icanlocalize.com/site/ Cheers, - Johan On Mon, Jul 4, 2011 at 12:46 PM, Salines wrote: > > Try http://translate.umpirsky.com/ > > On 1 srp, 17:00, Mati wrote: >

Re: Avoiding action access by url

2011-07-01 Thread Johan
I don't know why would you want that, because that will be a pain in the ass for the users and there is no way to do it in a bullet-proof way: - You can check the REFERER provided on each request to ensure that the user is coming from another page of your server. The problem is that users can fake

Re: Pagination Problem

2011-06-30 Thread Johan
Could it be that this second page is coming through an ajax request? This type of error usually pops up when you try to use the PaginationHelper but no pagination has been done on the controller. Cheers, - Johan On Wed, Jun 29, 2011 at 9:12 PM, Ed Propsner wrote: > I've been poking aro

Re: using subfolder in views

2011-06-29 Thread Johan
You can use a different view, even in a subdirectory (or in a totally different directory if you play with relative paths) by using the Controller's render() method: http://book.cakephp.org/view/980/render Cheers, - Johan On Wed, Jun 29, 2011 at 2:53 AM, nOLL wrote: > Hi, > > I

Re: Multi Habtm Pagination

2011-06-29 Thread Johan
be INNER and to group the find results by Product.id. [1] http://book.cakephp.org/view/1047/Joining-tables [2] http://web-development-blog.co.uk/2010/09/14/cakephp-habtm-find-with-conditions-and-containable-behavior/(first example) Cheers, - Johan On Wed, Jun 29, 2011 at 9:54 AM, Cengiz

Re: Query Help

2011-06-28 Thread Johan
change the current behavior. Cheers, - Johan On Tue, Jun 28, 2011 at 1:49 AM, Krissy Masters wrote: > I am submitting a value thru a form, based on the value a var is passed > to the query. > > ** ** > > function getValueSub( $data) { > > $primary = ( $data['

Re: 2nd order pagination using Containable with a filter

2011-06-22 Thread Johan
d'), 'conditions' => array('Nationality.language_id LIKE ?' => 2) // Do you really need to use LIKE instead of equals? ) ) ) ); If you require the Nationality to be an inner join, you may need to rebind the models on runtime or add an explicit

Re: 2nd order pagination using Containable with a filter

2011-06-22 Thread Johan
d'), 'conditions' => array('Nationality.language_id LIKE ?' => 2) // Do you really need to use LIKE instead of equals? ) ) ) ); If you require the Nationality to be an inner join, you may need to rebind the models on runtime or add an explicit

Re: relations through habtm

2009-08-01 Thread johan
quot;recursive" => 2)); > > "recusive" defaults to 1, meaning it will get data from news and its > associated models (organisations_user). That's why you don't have User > and Organisation. By setting it to 2 find will also get fields from > models associated to

relations through habtm

2009-07-31 Thread johan
Ive got a small problem with my cakephp app... I have in my design a habtm as a central table wich several other table relates to. This due to that Users can be members of different organisations over time news belongsTo organisations_user organisations_user hasOne user, organisation user hasAnd

Re: Site Construction.. Integrating Views + Footer/Header/Menus etc?

2008-03-04 Thread Johan @ Notitia.nl
Well, there are thousands of ways to render information at your screen, but here are some 'CakeCorrect' methods: 1) Put all the code at your view (fastest to render, but hard to maintain) 2) Put all the snippets in elements and print those at your view (way slower, but easy to edit. also re-usabl

Re: User Based RSS

2008-03-03 Thread Johan @ Notitia.nl
With the example url (http://myapp.com/my_controller/my_rss/user_hash) you should create a controller like this: set('data', 'No UserHash defined'); } else { $data = $this->MyModel->findAll(array('user_hash' => $user_hash)); $this->set('data', $data

Re: filling an array for a selectbox (v1.2)

2008-02-24 Thread Johan @ Notitia.nl
issuers; } And keep your controller and view the same. Johan de Jong On 24 feb, 14:24, Ronald <[EMAIL PROTECTED]> wrote: > I know that, but the data does not come from my database, but from an > API that delivers it in a specific format. > I just need to know what I have to do

Re: generating a select statement for a user's country

2008-02-24 Thread Johan @ Notitia.nl
The following works for me: $this->Dealer->Country->displayField = 'name'; $countries = $this->Dealer->Country->find('list'); $this->set('countries', $countries); This will return an array like this: Array ( [1] => Netherlands [2] => Belgium [3] => Germany [4] => France ) The

Re: Paginate an array thats not from a model

2008-01-21 Thread Johan @ Notitia.nl
s->pagination[$key] = $val; } $this->set('result', $this->paginate()); I hope this will help you out! Johan de Jong On 18 jan, 22:05, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On Jan 18, 2008 1:54 PM, [EMAIL PROTECTED] > > <[EMAIL PROTECTED]>

Pagnation with multiple Models

2008-01-11 Thread Johan @ Notitia.nl
ta = $this->paginate(); $this->set('results', $data); } /* more functions and stuff */ } } ?> The above script works, but when I remove one of the # it gives an error, becuase it doesn't use the Occassion Model.

Re: Menu System Help - Render Element and Model Functions?

2007-12-30 Thread Johan @ Notitia.nl
=latin1_general_ci AUTO_INCREMENT=2 ; INSERT INTO `menus` VALUES (1, 'Homepage', '/', 'header', 1, 'true'); And last but not least you need to add the following line at your default html (eg. app/views/layout/default.thtml) renderElement('menu'); ?&g

Save into multiple models

2007-10-03 Thread Johan Forngren
rked', '/'); } } } add.thtml formTag('/posts/add')?> input('Post/title') ?> input('Meta/tid') ?> submit() ?> I hope you understand my question and thanks for your time. Cheers, Johan Forngre