Re: CakePHP Forum launched!

2016-05-03 Thread euromark
This forum should be closed and switched to read only. The other one should now be the only one in use. See the PRs to change the links on the CakePHP sites and documentation etc. Mark Am Dienstag, 3. Mai 2016 03:01:20 UTC+2 schrieb Reuben: > > Maybe this post should get stickied / pinned, so

Re: cakephp 3 modular programming

2016-04-20 Thread euromark
It's called plugins https://github.com/FriendsOfCake/awesome-cakephp etc Mark Am Mittwoch, 20. April 2016 18:26:27 UTC+2 schrieb Anurag Kumar: > > Is it possible to do modular programming with cakePHP 3. > > If yes please provide some example on it. > -- Sign up for our Newsletter for

Re: Replacement Date Widget

2016-04-01 Thread euromark
Side-note: A lot of browsers still do not fully support that. Make sure that you at least provide a shim/fallback for those. Mark Am Donnerstag, 31. März 2016 02:32:39 UTC+2 schrieb Justin Harrison: > > I would like to replace the default date widget in CakePHP3 with the HTML5 > date tag. I

Re: CakePHP 3 Role Authorization for controllers and methods

2016-03-27 Thread euromark
I use https://github.com/dereuromark/cakephp-tinyauth to exactly prevent this complicated if/switch statement logic from happening all over the controllers ;) One simple to configure ini file, done. Mark Am Sonntag, 27. März 2016 11:43:31 UTC+2 schrieb LSRX4EVER: > > Hello Everyone, > > I'm a

Re: php requirements for 3.X

2016-03-18 Thread euromark
The requirement *is* a requirement. Am Freitag, 18. März 2016 14:32:03 UTC+1 schrieb MikeK: > > Am migrating to 3.2 from cakephp 2.x, but my host only offers php 5.4 - I > saw the install requirements want 5.5.9 > > Should I find another host or will 3.2 operate OK on 5.4? > > Thanks in advance

Re: how enable identifier quoting???

2016-03-14 Thread euromark
What part of https://github.com/cakephp/app/blob/master/config/app.default.php#L237-L245 is not understandable? Mark Am Montag, 14. März 2016 04:34:29 UTC+1 schrieb Leonidas Savvides: > > *If you are using SQL keywords as table column names, you can enable > identifier quoting for your

Re: Cakephp 2.x Receive emails into the application...

2016-03-13 Thread euromark
This might help you https://github.com/barbushin/php-imap Am Samstag, 12. März 2016 01:31:18 UTC+1 schrieb April DeRossett: > > Ahoy! I am looking for a way to receive reply emails into my cakephp > application and after a ton of research I haven't yet figured out how to > make that happen.

Re: CakePHP 3.x and Redis as one of the main Database

2016-02-21 Thread euromark
You could work together and upgrade it to 3.x. Dont forget to publish it on https://github.com/FriendsOfCake/awesome-cakephp then. Mark Am Sonntag, 21. Februar 2016 15:06:29 UTC+1 schrieb web tools: > > Hello, > > I am new to CakePHP and I am wondering which is the best way to use Redis >

Re: CakePHP 3.0 location for API-Access

2016-02-21 Thread euromark
Take a look at twitter, and how they did it: https://github.com/cvo-technologies/cakephp-twitter Am Sonntag, 21. Februar 2016 15:06:29 UTC+1 schrieb web tools: > > Hello, > > I would like to use the API of OpenWeatherMap ( > http://openweathermap.org/api) in my CakePHP 3.x Application, but I am

Re: Sorting paginated data by string length in cakephp 3.x

2016-02-09 Thread euromark
using 3.x virtual fields, expr() func() see the docs for that Mark Am Sonntag, 7. Februar 2016 17:48:33 UTC+1 schrieb jakubplus: > > Hi, > > I'd like to use Paginator sorting function, but for sorting by string > length like mysql LENGTH(title) > > $this->Paginator->sort('title') > > How to

Re: Bug: flaws in email validation/sending

2016-01-31 Thread euromark
Please open a ticket at https://github.com/cakephp/cakephp/issues This is just a discission board, not a bug tracker. Mark Am Samstag, 30. Januar 2016 05:33:10 UTC+1 schrieb Kim: > > >- CakePHP's email validation allows non-ASCII letter characters, e.g. >á, in the local part of the

Re: ajax pagination

2016-01-07 Thread euromark
See http://sandbox3.dereuromark.de/sandbox/ajax-examples Mark Am Dienstag, 5. Januar 2016 10:21:29 UTC+1 schrieb Kamlesh Gupta: > > Hello, > > I am facing a problem of pagination in cakephp 3.14.. > > How can we make a ajax pagination in cakephp 3.1.4 > > would anyone please help me. > --

Re: How to unset field value of a post edit view

2015-12-22 Thread euromark
You need to be more specific. Also, your forms should always preserve the correct state on post, and should preset on get with DB values etc. Failing to do so will get you in trouble. Mark Am Dienstag, 22. Dezember 2015 11:39:13 UTC+1 schrieb Amit Gora: > > i am using checkbox array in my form

Re: Unable to delete first record using postLink()

2015-12-22 Thread euromark
You already answer yourself: Forms in forms is invalid. The docs tell you what to do, use a block to capture the forms of the postLink() and output it after you closed the form. Mark Am Dienstag, 22. Dezember 2015 11:39:13 UTC+1 schrieb Jaspreet Sarao: > > Hello, I am new to cakephp.. > > I

Re: how to connect a simple registration form with mysql

2015-12-22 Thread euromark
Please see the tutorials in the docs. Mark Am Dienstag, 22. Dezember 2015 11:39:13 UTC+1 schrieb kumar pkvel: > > i want to connect a registration form am a beginner i need to connect in > xampp cake php version3.1.2 > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on

Re: CakePHP 3 Shell arguments and options

2015-12-22 Thread euromark
See the existing core shells for details. They use it quite a bit. Tip: ConsoleOptionParser Mark Am Dienstag, 22. Dezember 2015 11:39:13 UTC+1 schrieb Martina Weinzettelova: > > Hello > > I cant find in docummentation how can i access passed argumet and options > in shell function. > >

Re: Is the automatic direction change broken in the paginator for the latest Cake 3 release?

2015-12-11 Thread euromark
What "is" your latest cake3 release? Are you referring to 3.0 or 3.1? I highly doubt that, there are tests for this behavior. Are there any links outputted at all? What do they say? You need to be more exact in your statements, or it is hard to say anything here. mark Am Freitag, 11.

Re: cakephp 2.5 cron jobs

2015-11-27 Thread euromark
Maybe you can, but you probably shouldn't the call as documented definitly works. Just make sure you got permissions (+x) for the console cake file! Mark Am Mittwoch, 25. November 2015 14:01:00 UTC+1 schrieb Igor Padovan da Silva: > > You can use the */full/path/to/Console/cake -app

Re: 404 requests filling view cache

2015-10-28 Thread euromark
Yes, in 2.4+ there is a skipLog param: http://book.cakephp.org/2.0/en/appendices/2-4-migration-guide.html#errorhandler But I just log them to a different log file via custom handler: See

Re: Cake3, rss helper and cdata

2015-10-07 Thread euromark
I think the Rss helper should not be used for rss anymore, its a little bit outdated approach and has some flaws. Check the Feed plugin repo and its RssView class ( https://github.com/dereuromark/cakephp-feed ) as well as http://www.dereuromark.de/2013/10/03/rss-feeds-in-cakephp/ Mark Am

Re: if($this->Auth->login($this->request->data)) Return true with right or wrong password and iden

2015-09-21 Thread euromark
Read the documentation. You are never supposed to pass anything to login() in this case. mark Am Samstag, 19. September 2015 22:11:47 UTC+2 schrieb abdessamad kassasse: > > i will show my code > utilisateurcontroller > public function login() > { >

Re: How to run multiple development cakephp projects on the same cake server?

2015-08-18 Thread euromark
Just use virtual hosts and you can run infinite projects on the same one, either per domain or per subdomain :) I never use localhost directly ;) See http://www.dereuromark.de/2011/05/29/working-with-domains-locally/ for example. Mark Am Montag, 17. August 2015 09:40:28 UTC+2 schrieb Raul

Re: CakePHP 3 Component

2015-07-20 Thread euromark
model function which then follows business rules and runs a series of processes in sequence. So my question is “when the progress one wants to track is within the model layer, how does one expose that to the controller layer”? On 18 Jul 2015, at 11:56, euromark dereu...@gmail.com javascript

Re: CakePHP 3 Component

2015-07-18 Thread euromark
to javascript calls? On 17 Jul 2015, at 09:55, euromark dereu...@gmail.com javascript: wrote: Your models should stay stateless, as such you should never internally use the session. Instead, pass the data to the model layer or use events to pass them Use https://github.com/UseMuffin

Re: CakePHP 3 Component

2015-07-17 Thread euromark
Your models should stay stateless, as such you should never internally use the session. Instead, pass the data to the model layer or use events to pass them Use https://github.com/UseMuffin/Footprint Mark Am Donnerstag, 16. Juli 2015 23:03:45 UTC+2 schrieb Rafael Queiroz: Hi guys, I need

Re: Composer and Cake lib folder

2015-07-16 Thread euromark
, July 13, 2015 at 8:10:52 AM UTC-7, euromark wrote: That is actually how you are *supposed* to do it. the vendors including the cake core should never be commited and tracked. See https://github.com/dereuromark/cakefest for an example implementation (both 2.x and 3.x composered). mark

Re: Composer and Cake lib folder

2015-07-13 Thread euromark
That is actually how you are *supposed* to do it. the vendors including the cake core should never be commited and tracked. See https://github.com/dereuromark/cakefest for an example implementation (both 2.x and 3.x composered). mark Am Sonntag, 12. Juli 2015 13:23:06 UTC+2 schrieb

Re: cakephp ajax pagination

2015-07-13 Thread euromark
There are many different (and easy ways), IMO the best way would be one that also allows a fallback (non js in case js is broken or for google bot etc) see http://sandbox3.dereuromark.de/sandbox/ajax-examples/pagination for an example in cake3. mark Am Sonntag, 12. Juli 2015 13:23:07 UTC+2

Re: noisy logs

2015-07-10 Thread euromark
You should always mention the exact cakephp version you are using. Am Freitag, 10. Juli 2015 02:17:35 UTC+2 schrieb . .: Is there a way to split the NotFoundException to another log file? Instead of error.log, it should go to, for example, notfoundexception.log file. Thanks -- Like Us

Re: Result of function search is very large

2015-06-29 Thread euromark
Looks to me as if you could have done the same thing properly (not using session but PRG pattern) and with 3 lines of code using https://github.com/CakeDC/search mark Am Montag, 29. Juni 2015 10:30:50 UTC+2 schrieb Eb ook: Hello all, Result of function search is very large, It sometime is

Re: cakephp search

2015-06-18 Thread euromark
You need to be more precise. Mark Am Donnerstag, 18. Juni 2015 10:17:17 UTC+2 schrieb SURYA PANDEY: *how to create search system using database in cake php.. plz suggest me* -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You

Re: Would you please give me great explaination below what i have mentioned concepts?

2015-06-15 Thread euromark
It is all explained in the docs: http://book.cakephp.org/3.0/en/orm/saving-data.html#namespace-Cake\ORM Am Freitag, 12. Juni 2015 07:27:43 UTC+2 schrieb Gowthaman Suriya: Hi developer, I am stumped with these things are such as newEntity(), element(), patchEntity(), set()?. If you know

Re: Advise plugin to compress CSS and JS for cakephp 3.x

2015-06-11 Thread euromark
https://github.com/FriendsOfCake/awesome-cakephp#asset-management Am Mittwoch, 10. Juni 2015 19:40:13 UTC+2 schrieb InYan: Advise plugin to compress CSS and JS for cakephp 3.x. In the old version of the framework I've used CakePHP-Combinator-Plugin

Re: Special table/column name

2015-06-08 Thread euromark
In the conventions section of the docs I bet. name or title gets autoselected for the displayField. Am Sonntag, 7. Juni 2015 21:33:23 UTC+2 schrieb Leo Wong: Hi, It seems there are some special table/column name will have advantage for cakephp, like the column name will be show rather than

Re: Migrations cake v.1.3 - v.3.x

2015-06-05 Thread euromark
This is all you need in your Table: https://github.com/dereuromark/cakephp-tools/blob/cake3/src/Model/Table/Table.php#L132 Am Freitag, 5. Juni 2015 09:16:44 UTC+2 schrieb InYan: https://lh3.googleusercontent.com/-2nzlMXaom3g/VXFLwLPOOjI/AQ0/3d473WJBcPo/s1600/qq.jpg Please suggest if

Re: Migrations cake v.1.3 - v.3.x

2015-06-05 Thread euromark
Basically $sql = $this-schema()-truncateSql($this-_connection); foreach ($sql as $snippet) { $this-_connection-execute($snippet); } Am Freitag, 5. Juni 2015 12:15:01 UTC+2 schrieb euromark: This is all you need in your Table: https://github.com/dereuromark/cakephp-tools/blob/cake3/src/Model

Re: I need some help with CakeDC Search

2015-06-01 Thread euromark
See http://sandbox3.dereuromark.de/sandbox/search-examples and the code to it for example. Am Sonntag, 31. Mai 2015 23:39:15 UTC+2 schrieb Jekill CR: *I need some help with CakeDC Search i configured the plugin with the instructions and nothing happens.* Only show the text of the search

Re: How to use Plugins in CakePHP 2.6..??

2015-06-01 Thread euromark
http://book.cakephp.org/2.0/en/plugins.html Am Sonntag, 31. Mai 2015 23:39:15 UTC+2 schrieb Solomon Gebreslasie: Hello there, My name is Solomon G. I am making E-commerce website for a friend and I was wondering if some one could tell me how to use cakePHP Plugins..?? -- Like Us on

Re: Forgot password in cakephp 3.0

2015-05-30 Thread euromark
See https://github.com/dereuromark/cakefest/blob/3.0/src/Controller/AccountController.php#L82 for an example Am Dienstag, 26. Mai 2015 14:39:33 UTC+2 schrieb Karthik Keyan: Hi, How we set the validation for the forgot password. Password can be send to email *please send the

Re: How to set Authorization wise view in the Form in CakePHP-3.0

2015-05-28 Thread euromark
check() and comparison is really a bad idea the first returns bool, how should that ever === to a string? wrapping that with !empty() makes this completely wrong if(!empty($this-request-session()-check('Auth.User.role') === 'superadmin')){ Try if

Re: Migrate from Cake 2.x

2015-05-25 Thread euromark
Let me know what you came up with We should add this to the https://github.com/dereuromark/cakephp-shim plugin to ease migration of those forms from 2.x to 3.x in general. The IDs generated in 3.x are too collision-likely for me too. Mark Am Mittwoch, 20. Mai 2015 13:39:35 UTC+2 schrieb

Re: Cakephp 3.0 saveField

2015-04-03 Thread euromark
Just use save()? Am Freitag, 3. April 2015 00:05:12 UTC+2 schrieb DiV: How can I update a single field if I know record's id without retrieving a row? There was a method saveField for this action in cakephp 2.x -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter

Re: Notice (8): Undefined variable: color [APP/Template\Pages\myshow.ctp, line 2]

2015-04-02 Thread euromark
Hi! Why are you abusing the pages controller for that? It doesn't support actions out of the box. Make yourself a new FooController and then you can have actions for your views. But the PagesController itself only supports view files only (no action for it) The error you get shows this pretty

Re: CakePHP 3.0 - Confusion comes from

2015-03-30 Thread euromark
() and $this-Articles-patchEntity() when you are saving a new record? I thought that newEntity was used when inserting new data, and patchEntity was for updating existing data? Is my understanding incorrect? Dave On Friday, 27 March 2015 21:24:38 UTC, euromark wrote: The latter is deprecated

Re: CakePHP 3.0 - Confusion comes from

2015-03-28 Thread euromark
It would be cool if you could PR the corrections so that others don't trip over it, too. mark Am Samstag, 28. März 2015 10:35:52 UTC+1 schrieb Bayezid Alam: Ok, Thanks for reply.. :) On Sat, Mar 28, 2015 at 3:24 AM, euromark dereu...@gmail.com javascript: wrote: The latter

Re: CakePHP 3.0 - Confusion comes from

2015-03-27 Thread euromark
The latter is deprecated, this changed during RC and as such the tutorial needs some updating. Thats all there is to it :) Mark Am Freitag, 27. März 2015 15:37:26 UTC+1 schrieb Bayezid Alam: Hi, A confusion comes on my mind regarding the adding something on CakePHP 3.0 As example given

Re: Advice for a newbie?

2015-03-22 Thread euromark
Since weeks there is only one real option: Cake3 :) Use this version right away, as a bonus it just became stable as of today enjoy Happy Baking Mark Am Sonntag, 22. März 2015 13:37:30 UTC+1 schrieb Jim_1993z: Hello, I am an occasional database programmer, going way back to dBase days and I

Re: Lazy loading components

2015-03-18 Thread euromark
They need to be able to run initialize() and startup() before any action, so thats hard to do. And yes, micro-opt. without a real value IMO :) Mark Am Mittwoch, 18. März 2015 11:53:14 UTC+1 schrieb Gonçalo Marrafa: Hi there! Is there a way to enable lazy loading of components? As far as i

Re: Fatal error: Call to a member function link() on a non-object in

2015-02-26 Thread euromark
That is 1.2 syntax, this isnt supported for the last 5 years. What kind of code are you working with, and why are you trying to use it with recent versions of CakePHP? Please consult the documentation on how to properly call helpers (besides the fact that this helper doesnt exist anymore). mark

Re: cant remove page from url pagination to prevent error

2015-02-19 Thread euromark
no, it is always get (you are not modifying the DB). Am Mittwoch, 18. Februar 2015 22:44:05 UTC+1 schrieb ajt: You mean use get instead of post? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because

Re: how can i return to page with same search filters

2015-02-19 Thread euromark
IMO you shouldnt reinvent the wheel (with design flaws in it), but re-use best practice approaches via plugin form that have been working for many years with ease: https://github.com/CakeDC/search is the de facto standard for easy filtering of your paginated data Mark Am Donnerstag, 19.

Re: how can i return to page with same search filters

2015-02-19 Thread euromark
Trust me, it is easier than what you are trying to do :) And only 1-2 lines of code and it works out of the box. Am Donnerstag, 19. Februar 2015 23:18:56 UTC+1 schrieb ajt: I had a look it and it looks difficult to use. NOt sure if this is the best way to go and where is a complete example

Re: cant remove page from url pagination to prevent error

2015-02-18 Thread euromark
Are you by any chance mixing named params and query strings? you shouldnt do that. It is best to completely drop named params, and instead use query strings completely. I know for a fact that it all works then just fine :) See www.dereuromark.de/2013/05/04/passed-named-or-query-string-params/

Re: Is possible to make a online ticket booking website in CakePhp

2015-02-10 Thread euromark
http://stackoverflow.com/questions/28409805/is-possible-to-make-a-online-ticket-booking-website-in-cakephp answers it all Am Dienstag, 10. Februar 2015 06:20:58 UTC+1 schrieb nicky: Dear, You can make any kind of web application in the Cake-PHP, it is just a framework and you should know

Re: Action a postLink without refreshing page (AJAX?)

2015-02-08 Thread euromark
Maybe this helps? http://stackoverflow.com/questions/9750326/intercept-cake2-postlink-form-posts-with-jquery Am Samstag, 7. Februar 2015 17:34:38 UTC+1 schrieb MarkB: Hi, My first Cake project (and first major non-intranet web project!) is a fairly complex event management system for a

Re: Soft delete plugin for cakephp 3

2015-02-02 Thread euromark
Feel free to add it to https://github.com/FriendsOfCake/awesome-cakephp/tree/cake3 Thats the list people would look for plugins and alike :) mark Am Sonntag, 1. Februar 2015 03:40:21 UTC+1 schrieb Pgbi: Hi guys, For one of my projects, I developed a plugin to nicely handle soft deletion

Re: Cakephp Autocomplete Tutorial ajax error

2015-02-01 Thread euromark
It is best not to use the JS helper(s) etc. Use just plain jQuery and it will work quite easily out of the box See http://sandbox.dereuromark.de/sandbox/ajax_examples/ for live examples mark Am Sonntag, 1. Februar 2015 01:13:54 UTC+1 schrieb ajt: In CakePHP, I am trying to create a

Re: deploying CakePHP app

2015-01-25 Thread euromark
One of the most simple scripts is maybe sth like #!/bin/bash echo ### INSTALL ###; php composer.phar selfupdate git pull php composer.phar install --prefer-dist --no-dev --optimize-autoloader echo ### CLEANUP ###; rm -rf ./tmp/cache/models/* rm -rf ./tmp/cache/persistent/* echo ### DONE

Re: Session date missing after redirect

2015-01-25 Thread euromark
Hope you didnt have too many files to manually check. You know that there are tons of tools for that, right? E.g. https://github.com/dereuromark/cakephp-tools/blob/master/Console/Command/PhpTagShell.php or

Re: Problem with Session and PHP Unit Test

2015-01-21 Thread euromark
checked with that option and nothing really changed. I forgot to mention it's cakephp 3.0. This is the command I'm running: php phpunit.phar --stderr -v tests/TestCase/Controller/ UnitTestsControllerTest.php On Tuesday, 20 January 2015 18:58:47 UTC, euromark wrote: Dont forget --stderr when

Re: 3.0 e mysql fields ENUM

2015-01-20 Thread euromark
for of one field in my model for manager de columns STATUS. I can't use Enum because the value of the STATUS isn't same in another model. What you think i can do ? I think do one properties in each model, but i don't know how do this. Em Fri Jan 16 2015 at 15:54:48, euromark dereu...@gmail.com

Re: Problem with Session and PHP Unit Test

2015-01-20 Thread euromark
Dont forget --stderr when testing 2.x tests in CLI mark Am Dienstag, 20. Januar 2015 13:29:47 UTC+1 schrieb monica: Hi! I baked new UnitTestsController for testing purposes and put inside the function: public function reset_filters() { // suppose to delete CurrentFilter var from

Re: Session date missing after redirect

2015-01-19 Thread euromark
You must have some special session setup. For no one else this happens - ever. Try to set up a completely fresh system and debug that one piece by piece. If that happens there too its most likely a server issue. Otherwise it is probably a misconfiguration in your configs in CakePHP etc. mark

Re: Authentication and multiple ajax request

2015-01-17 Thread euromark
Well, what you are doing there is pretty wrong in the first place. Calling login($data) directly logs in whatever you send it (see the docs for details), rendering a form login process invalid and insecure. You should, just as with any other non-ajax request, properly use the Auth adapters to

Re: When to use appcontroller

2015-01-17 Thread euromark
You could use a component instead. mark Am Mittwoch, 14. Januar 2015 02:10:39 UTC+1 schrieb Ben Merton: I'm wanting to make certain variables (counts of various records) to be used on most views in my app. Currently I'm both loading each relevant model and doing the count operation to

Re: 3.0 e mysql fields ENUM

2015-01-16 Thread euromark
Enums are a bad thing anyway. Better use sth of the options listed @ http://www.dereuromark.de/2010/06/24/static-enums-or-semihardcoded-attributes/ mark Am Donnerstag, 15. Januar 2015 23:18:45 UTC+1 schrieb Leandro Machado Pereira: I gave up using enum. Thanks. Em Thu Jan 15 2015 at

Re: ACL View

2015-01-16 Thread euromark
A few points: - https://github.com/GWD-WEB/acl-view/blob/master/Controller/PermissoesController.php#L2 is an invalid use statement - the plugin is missing test cases (which would have revealed point 1) - you should add composer support, as this is the de facto standard at this point to include

Re: cakePHP 3.0-RC1, turning off HTML5 browser validation globally on user side ???

2015-01-09 Thread euromark
Lorne you can actually set a config on the user side when using sth similar I did in my plugin (since 2.x). You can either use my Tools plugin directly, or copy and paste the relevant part: https://github.com/dereuromark/cakephp-tools/blob/cake3/src/View/Helper/FormHelper.php#L16

Re: cakePHP 3.0-RC1, turning off HTML5 browser validation globally on user side ???

2015-01-09 Thread euromark
', 'true'); so that it is called only on start-up ? Regards Lorne On Friday, January 9, 2015 at 2:45:21 PM UTC-5, euromark wrote: Lorne you can actually set a config on the user side when using sth similar I did in my plugin (since 2.x). You can either use my Tools plugin directly

Re: Validation error on baked date field , CakePHP 3

2015-01-08 Thread euromark
Answer is here: https://github.com/cakephp/cakephp/issues/5611 Am Donnerstag, 8. Januar 2015 21:54:34 UTC+1 schrieb Lorne Dudley: I have a baked cakePHP-3.0.0 page which has a field defined as 'date_of_birth date DEFAULT NULL' in TABLE users. When I click the Submit for the add function I

Re: mailchimp cakephp api

2015-01-01 Thread euromark
Those are all pretty common-knowledge things regarding basic CakePHP stuff, if you used it for a while. It might be best to first get a grasp on CakePHP and a few easy things, and go from there. Don't try to understand all at once. Using composer is explained on their page. You could just drag

Re: cake events

2014-12-27 Thread euromark
For a small community application I also still ajax PULL every x seconds for this. As long as the users stay in a range ( ?) this might very well work as a (short term) solution. The state of the art approach would be a PUSH notification service, though, as described - here:

Re: Use function in controller AND view

2014-12-23 Thread euromark
Yeah it says *outside*. Inside the view layer you don't use CakeNumber, you use the helper Number: $this-Number-...() which, of course, internally wraps the CakeNumber functionality. Am Dienstag, 23. Dezember 2014 13:05:12 UTC+1 schrieb LDSign: Just one question in addition. The cookbook

Re: Use function in controller AND view

2014-12-22 Thread euromark
That's why we refactored the whole thing into a lib class: https://github.com/cakephp/cakephp/blob/master/lib/Cake/Utility/CakeNumber.php App::uses('CakeNumber', 'Utility'); $formattedNumber = CakeNumber::currency($value, $currency); It is documented quite thorougly, by the way:

Re: check controller variable is used in view

2014-12-20 Thread euromark
I dont think thats possible, especially since they could also be used in elements, view blocks etc. You can, however, add controller test cases, and then remove them piece by piece and see if things break. mark Am Samstag, 20. Dezember 2014 17:14:15 UTC+1 schrieb Radharadhya Dasa: Hi, Is

Re: Save not escape only field CakePHP 2

2014-12-17 Thread euromark
afaik it only wraps it to be able to safely save it the data ending up in the db should not be different. mark Am Dienstag, 16. Dezember 2014 19:32:10 UTC+1 schrieb John Andersen: Hi Euromark Actually CakePHP 2.x does modify the data - it escapes and quotes the data during the save

Re: Save not escape only field CakePHP 2

2014-12-16 Thread euromark
Actually, the save() etc don't modify your data. They simply store it the same way you give it to them. It might only be displayed this way in your sql backend. Am Dienstag, 16. Dezember 2014 11:44:08 UTC+1 schrieb Rafael Queiroz: It's a requirement for project, i have no details, just save

Re: 3.0 using FormHelper inside MyHtmlHelper

2014-12-16 Thread euromark
See that one? https://github.com/cakephp/cakephp/blob/3.0/src/View/Helper/HtmlHelper.php#L39 It's dangerous to overwrite a core helper and remove functionality from it. So you should either not overwrite $helpers, or do it correcty. Meaning, appending to it while not removing anything:

Re: CakePHP 3.0, how to change user password?

2014-12-12 Thread euromark
as in 2.x That means 3.x So that means you can transfer everything to 3.x And the link was also for 3.x mark Am Freitag, 12. Dezember 2014 16:12:58 UTC+1 schrieb frocco: I am using cakephp 3 On Thursday, December 11, 2014 6:58:02 PM UTC-5, euromark wrote: The same as in 2.x basically

Re: CakePHP 3.0, how to change user password?

2014-12-11 Thread euromark
The same as in 2.x basically applies. You hash your form field and save it. If you want to send an email for password forgotten, use a token and let the user afterwards chose a new one. Don't send the plain password. You can also look into

Re: In CakePHP 3, how do I check if user is logged in and has admin rights?

2014-12-08 Thread euromark
if ($this-Sessioncheck('Auth.User.id') {} Am Montag, 8. Dezember 2014 02:32:28 UTC+1 schrieb frocco: I want to check in my default layout. Thanks -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because

Re: compare time arrays

2014-12-08 Thread euromark
convert them both to int before comparing should work. or better yet, use DateTime class and its built in comparison methods. mark Am Samstag, 6. Dezember 2014 15:03:16 UTC+1 schrieb ajt: Hi, How do you compare time arrays in cakephp? I tried to convert the time to a string without success

Re: In CakePHP 3, how do I check if user is logged in and has admin rights?

2014-12-08 Thread euromark
schrieb frocco: Thank you, What is the syntax to check if they have a role called admin? Field name is role. On Monday, December 8, 2014 5:29:35 AM UTC-5, euromark wrote: if ($this-Sessioncheck('Auth.User.id') {} Am Montag, 8. Dezember 2014 02:32:28 UTC+1 schrieb frocco: I want

Re: In CakePHP 3, how do I check if user is logged in and has admin rights?

2014-12-08 Thread euromark
Yes, you can simply use Auth-allow(listofactionnames) as documented to make the non admin actions public. either in each controller, or globally in your app controller Am Montag, 8. Dezember 2014 19:28:17 UTC+1 schrieb frocco: I have another question. I used bake with the prefix admin and

Re: In CakePHP 3, how do I bake admin controller?

2014-12-04 Thread euromark
No need to move anything Just use bake correctly as documented: cake bake ... --prefix admin That will create it in the right places. Am Donnerstag, 4. Dezember 2014 17:38:46 UTC+1 schrieb cesar calvo: After bake just move Templates and Controllers to Admin directory and adjust the

Re: new to cakephp, should I learn this over yin/laravel4?

2014-11-26 Thread euromark
What about the (probably even more relevant) third option, using cakephp3 from here on? Am Donnerstag, 27. November 2014 00:10:42 UTC+1 schrieb frocco: Hello, Just installed cakephp 2 and have played around with it for about two hours. I have a project and wanted to know if I should

Re: adding input dynamic

2014-11-18 Thread euromark
http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html Am Dienstag, 18. November 2014 11:45:35 UTC+1 schrieb Davidson Santos: I am trying to create a dynamic input but it does not send the data someone could help me? Add.ctp: div class='related' ?php

Re: Looking for a is form dirty plugin

2014-11-14 Thread euromark
That can be done fairly easy by comparing the data before and after. For example via behavior, There are some existing ones that log the actual change for example to db: https://github.com/dereuromark/cakephp-tools/blob/master/Model/Behavior/LogableBehavior.php I bet there are quite a few more

Re: really verid sql thing

2014-11-09 Thread euromark
Using = with float is usually a very bad idea. You can look into https://github.com/dereuromark/cakephp-geo and how it does the custom finder for this. mark Am Sonntag, 9. November 2014 16:39:42 UTC+1 schrieb Radharadhya Dasa: Hi, Today I pop into something really strange.

Re: The AppController

2014-11-06 Thread euromark
Read about https://github.com/FriendsOfCake/crud it kind of does exactly that - but in a cleaner way :) mark Am Donnerstag, 6. November 2014 17:48:05 UTC+1 schrieb David Cole: I've always wondered if it is a preference or a standard to define function in your AppController instead of your

Re: CakePHP 2.5.5 and 2.6.0-beta released

2014-10-08 Thread euromark
Ah, i misread last with latest.. :) Well, it is the current latest, but yeah, there might still be a 2.7 version or something, as I think most will not want to upgrade their (large) projects to 3.x any time soon. Mark Am Mittwoch, 8. Oktober 2014 13:37:57 UTC+2 schrieb Nilson Pena: YES.

Re: CakePHP 2.5.5 and 2.6.0-beta released

2014-10-06 Thread euromark
Yes you could have easily found that out yourself, though, looking at the open source github repo. mark Am Montag, 6. Oktober 2014 09:31:57 UTC+2 schrieb HK: Is 2.6.0 the last version of 2.x ? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter

Re: Multiple role Authorization not working (based on tutorial) Cake 2.5.4

2014-09-26 Thread euromark
Just in case you want to keep the controllers lean and all that authorize code out of it in a central file, you might be interested in taking a look at http://www.dereuromark.de/2011/12/18/tinyauth-the-fastest-and-easiest-authorization-for-cake2/ I always like to code DRY and with clear

Re: Increase application process speed

2014-09-26 Thread euromark
If you are talking about CakePHP2.x, use model associations as everything is lazy loaded and bind on the fly only creates more code overhead and is less DRY. If you use the core ACL it will for sure have some impact, as row level access is usually overkill. But then again its hard to say if it

Re: Cake3 - Clean way to use session in models

2014-09-23 Thread euromark
I would say: Pass in the data from the controller. Also - this should give you an answer: https://github.com/ceeram/blame mark Am Dienstag, 23. September 2014 10:02:27 UTC+2 schrieb bato: Hi, I would know if there is a way to access to session user in Models. I have a table with

Re: View Helper

2014-09-18 Thread euromark
Sure they can easily add helpers $controller-helpers[] = 'MyHelper'; If you get the controller via initialize() or startup(). Am Donnerstag, 18. September 2014 00:54:25 UTC+2 schrieb Marcelo Aymone: Ok... there any way to load a helper throug a controller component? I cant modify

Re: Has the naming of controllers in cakePHP 2.5.4 been changed?

2014-09-18 Thread euromark
It always was PostsController.php in 2.x - as documented Am Donnerstag, 18. September 2014 18:45:58 UTC+2 schrieb vincent mbogo: I named a post controller for a certain project as posts_controller.php while using cakePHP 2.5.4.I got an error that PostsController.php could not be

Re: Credit card Expiry Date format in CakePHP 3

2014-09-17 Thread euromark
According to the docs this is all easily possible: http://book.cakephp.org/3.0/en/core-libraries/helpers/form.html#datetime-options Am Mittwoch, 17. September 2014 15:48:31 UTC+2 schrieb Jipson Thomas: Hi , Is there any option with the date input to change the display order. For example now

Re: View Helper

2014-09-17 Thread euromark
helpers should usually return things. Then you are flexible, whether you want to output it or use it in a different context mark Am Mittwoch, 17. September 2014 23:24:27 UTC+2 schrieb Marcelo Aymone: On extending a Form helper, is a good practice inject input fields automatic, with echo

Re: Authentication by logging out from all other devices in CakePHP 3

2014-09-16 Thread euromark
You would need to store the session_id s together with the user_id s in a table. I do that as online_activities This way I can invalidate users' sessions when needed to. But you will have to build that on your own on top I am afraid. Am Dienstag, 16. September 2014 13:31:40 UTC+2 schrieb Jipson

  1   2   3   4   5   6   7   8   9   10   >