CakePHP 3 - Login form not working

2015-07-21 Thread Mark Dijkema
I am following both the tutorials in the CakePHP 3 documentation and I am trying to get the login functionality working, but so far I have no luck. I have a Users table with the 2 fields 'username' and 'password'. The password is hashed with `(new DefaultPasswordHasher)-hash($password);` After

Re: Export CSV with CakePHP

2015-04-08 Thread Mark Payne
You don't have to use jquery or views to do this. I use this handy little function a lot. I usually put it in a Component but there is no need unless you need it elsewhere public function array_to_csv_download($array, $filename = export.csv, $delimiter=,) { // open raw memory as file so

CakePHP 3: Logs being saved to webroot

2015-01-07 Thread Mark Speener
I used composer to update a couple days ago on two sites and they both nagged me that they couldn't save logs. After some fiddling with permissions I figured out that they were saving to webroot which is probably not good. There was no change to my code, just cake from the update. -- Like

Re: Amazon AWS SimpleDB

2013-07-11 Thread Mark Neil Borromeo
Any updates on DBO for simpleDB? On Friday, April 11, 2008 11:57:16 PM UTC+8, Scott wrote: I'm in the process of creating a CakePHP DBO for SimpleDB. Everything is mostly working, including all the kinds of relations. I'm planning to release it as soon as we write enough of an application

Problem with afterFind for associated tables

2012-11-19 Thread Mark Wratten
looking for an elegant way to do this within the model, rather than resorting to putting the code in the controller. Thanks in advance Mark -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you

Re: Problem with afterFind for associated tables

2012-11-19 Thread Mark Wratten
' = ...)) so I do get the Town data. It is rather unfortunate that the data formats are different as it makes the afterFind code rather ugly. Mark On Monday, November 19, 2012 5:37:59 PM UTC-5, Mark Wratten wrote: We are using Cake 2.2.2 and we have the following tables - Article - id, group_id

Sequence Behavior in CakePHP 2.x ?

2012-10-09 Thread Mark Kessler
Hi! Does anybody know of a good sequence (ordered list) behavior for cakePHP 2.x? I used Neil Crookes Seqence Behavior but this hasn't been updated to 2.x yet. Thx! Mark -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received

Re: How to use two view(controller) in a page??

2012-09-04 Thread Mark Wratten
. Then when the home page is rendered, the news summary and login forms will be displayed. Mark On Monday, September 3, 2012 8:04:34 PM UTC-4, shyandsy wrote: could you put some details on, thanks a lot! Making a home page that includes login and news list. I can write a view and controller

Re: How to use two view(controller) in a page??

2012-09-02 Thread Mark Wratten
Easiest is to use requestAction() in the homepage view. On Thursday, August 30, 2012 4:26:12 PM UTC-4, shyandsy wrote: I am kind of new guy on cakePhp. So the description as below: I hope to provide two function to users in the homepage, login and news. The login uses the view login and the

Re: PHP functions in controller

2012-08-29 Thread Mark Wratten
$this-set('randword', $this-Word-findById(rand(1,$this-Word-find('count'; On Wednesday, August 29, 2012 10:24:26 AM UTC-4, Nareh Tarasyan wrote: Thanks Marcus but u know what I did here... see: $this-set('rand', rand(1,$this-Word-find('count'))); $this-set('randword',

Re: Subquery in join clause in CakePHP 2.2

2012-08-28 Thread Mark Wratten
of. Mark On Tuesday, August 28, 2012 12:08:38 PM UTC-4, ceap80 wrote: Hi Mark, could you post a code sample of how you solved? I'm always interested in querying the db the cakephpway. Thanks. On Monday, August 27, 2012 10:30:55 PM UTC-4:30, Mark Wratten wrote: Figured it out for myself

Subquery in join clause in CakePHP 2.2

2012-08-27 Thread Mark Wratten
in the docs, but it only seems to support joining tables rather than expressions. I could move the DISTINCT to the main query, but that does not perform as well, and also messes up pagination. Thanks Mark -- You received this message because you are subscribed to the Google Groups CakePHP group

Re: Subquery in join clause in CakePHP 2.2

2012-08-27 Thread Mark Wratten
Figured it out for myself, the subquery just goes in place of the table name. On Monday, August 27, 2012 6:17:05 PM UTC-4, Mark Wratten wrote: Is there a 'Cake' way of including subqueries in join clauses of SQL select statements? I'm looking to generate something in the form of - SELECT

Re: Best Practice to display data in layout or view

2012-08-11 Thread Mark Wratten
would be the purest approach but suffers the overhead of re-initializing the environment each time. Ideally, there would be some middle ground approach, which currently you have to roll yourself, by instantiating a new controller and calling the appropriate method yourself. Mark On Saturday

Need help with reverse routing

2012-08-10 Thread Mark Wratten
? If I need to resort to a custom router, how do you tell the the Cake rendering functions to use the custom router? Thanks in advance Mark -- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com

Re: Need help with reverse routing

2012-08-10 Thread Mark Wratten
cricket - thanks for the reply, I will try it and see if it works. Thanks Mark On Friday, August 10, 2012 4:18:32 PM UTC-4, cricket wrote: Here's a generic element I use for pagination: http://pastebin.com/JvKbyWUi Perhaps you can modify that to your own needs. With Cake 2.x I've had

How override base URL in PaginatorHelper

2012-08-09 Thread Mark Wratten
? Mark -- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com

Re: Model associations

2012-08-09 Thread Mark Wratten
Do you have var $belongsTo = array('Category', 'Product'); in your CatProduct model? On Thursday, August 9, 2012 10:43:43 AM UTC-4, André Luis wrote: Hi people, it´s me again! I am using a habtm relationship in my application, it works 100% fine... But the Product menu is created

Re: Why is composite primary key bad?

2012-08-08 Thread Mark Wratten
One possible exception might be HABTM tables, consisting of just the foreign keys to the related tables. MySQL only supports clustering on the primary key and using a composite primary key would give you a covered index, which in theory should perform a bit better. Though in practice, I have

Re: Select Last Record From Database

2012-08-08 Thread Mark Wratten
In your beforeSave callback you could include a cal that does something like - SELECT MAX(invoice_number) FROM table, then in your code, generate the next number. Though if the code is going to be used by many people simultaneously, you would need to create a unique index on that column, to

Re: Problem with ordering by a calculated field

2012-08-08 Thread Mark Wratten
Generally, the Haversine Formula is the best one to calculate distance between two points, given the lat/long of both the client and the hotel. See http://en.wikipedia.org/wiki/Haversine_formula for more information. SELECT acos(sin(radians(P2.latitude)) * sin(radians(P2.latitude)) +

Re: Problem with ordering by a calculated field

2012-08-08 Thread Mark Wratten
Oops, should be SELECT acos(sin(radians(P1.latitude)) * sin(radians(P2.latitude)) + cos(radians(P1.latitude)) * cos(radians(P2.latitude)) * cos(radians(P1.longitude) - radians(P2.longitude))) * 3963.1 AS distance On Wednesday, August 8, 2012 12:47:37 PM UTC-4, Mark Wratten wrote: Generally

Re: Is there a lighter weight alternative to requestAction?

2012-06-29 Thread Mark Wratten
that, so really it is the first time hit that counts. Mark -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send

Re: Is there a lighter weight alternative to requestAction?

2012-06-28 Thread Mark Wratten
. It is working, but I feel it could be done in a cleaner, simpler, more efficient way, but I am struggling how to figure out how to do that and stay within the Cake paradigm. Mark -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions

Is there a lighter weight alternative to requestAction?

2012-06-27 Thread Mark Wratten
else has had the same problem and come up with a better method? Incidentally the new view blocks in 2.1 are great and really work well for a modular design. Thanks Mark -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions

Re: Model Associations Question

2012-06-27 Thread Mark Wratten
In you code you have 'className' = 'Bookings'. Shouldn't that be 'className' = 'Booking' ? You should also be able to shorten it to - var $belongsTo = array('Booking') as you are using booking_id as your foreign key. MArk On Wednesday, June 27, 2012 2:34:25 AM UTC-4, Sanfly wrote: Sorry

Re: Slightly different models, merge or separate?

2012-06-27 Thread Mark Wratten
you want to include in a query should be in a separate column. Mark On Monday, June 25, 2012 4:12:43 AM UTC-4, Poyan Nabati wrote: *How should I implement this on the backend?* - *Two models.* I thought of having two models, Goal and Measurement, where Measurement has a corresponding

Re: One model, multiple pagination in a single view with conditions?

2012-06-27 Thread Mark Wratten
You can only paginate one way at a time, so presumably you can set the associations dynamically depending on the parameters from jQuery. Though separate models might be cleaner as you can hard-code the associations. Mark On Monday, June 25, 2012 11:41:16 PM UTC-4, 42startups wrote

Re: URGENT - NEED HELP IN ASSOCIATION HABTM

2012-06-27 Thread Mark Wratten
Often it is easier to create a model for the linking table, i.e. OrderProduct and use belongsTo Order and Product rather than using HABTM associations. Then query using that model. Mark On Monday, June 25, 2012 11:10:11 AM UTC-4, Caio Vncius wrote: Hello, need a help in a ratio of two-mode

Re: How get Exception Handler to use plugin layout?

2012-06-22 Thread Mark Wratten
Majna, thanks for the tip. That inspired me to think about it a bit more and I figured it was simpler and cleaner to set the layout in bootstrap.php where the plugin is loaded. That is working well. Thanks Mark On Friday, June 22, 2012 2:24:36 PM UTC-4, majna wrote: You can use

How get Exception Handler to use plugin layout?

2012-06-21 Thread Mark Wratten
to configure it to do so other than by writing a new exception handler. Is there a quick way of configuring the layout to use? Thanks Mark -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help

Re: How to send a fax

2012-02-07 Thread Mark Walls
I would suggest looking at an Asterisk server. They have a fax server implementation that would mix well with a full telephony line: http://store.digium.com/productview.php?product_code=804-7 It would also be useful for tracking the full communication line on an idea - fax, video conference

CakePHP 1.3, 2.0 and SqlServer views

2012-01-04 Thread Mark Tom Sawyer
/3f984b68facd9ba3c1eaa49d87d2bd115a87ce61 Thanks Mark Tom Sawyer m...@tomsawyer.com.br -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group

Can't Get Media Plugin to Work with Nested Models

2011-10-03 Thread Mark
I have been using the Media Plugin by David Persson and I think it's great and has saved me a lot of time. I started out with an Invoice model that hasMany Attachments and everything worked well. I then added Materials to my invoice and tried added Attachments to a specific material associated

Having Trouble with Media Plugin and a Nested Model HTTP Post

2011-10-03 Thread Mark Fruhling
I have been using the Media Plugin by David Persson and I think it's great and has saved me a lot of time. I started out with an Invoice model that hasMany Attachments and everything worked well. I then added Materials to my invoice and tried added Attachments to a specific material associated

Re: Elgg v CakePhp

2011-09-22 Thread mark kelly
...@gmail.com wrote: That's not a very good comparison.  This is what Elgg is: http://en.wikipedia.org/wiki/Elgg_(software) It's a social networking engine, but CakePHP is not.  Could you narrow down your comparison? On Wed, Sep 21, 2011 at 7:38 PM, mark kelly markkelly1...@gmail.com wrote

Re: Elgg v CakePhp

2011-09-22 Thread mark kelly
Hi flosky Thanks dor the advice, I'm going to look into cakePHP more and see how customisable it is, and if its easier to understand than Elgg Mark On Sep 22, 1:14 pm, flo.kl...@googlemail.com flo.kl...@googlemail.com wrote: Hey Mark, I can't answer all your questions, but the following: Does

existing code base - worth importing to cakePHP in order to apply best practices?

2011-09-21 Thread mark kelly
doing at all? Thanks Mark -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr

Elgg v CakePhp

2011-09-21 Thread mark kelly
Hi My team have been using Elgg to build a social commerce site. We have all found it confusing and slow. Additionally, the database uses an EAV model, totally different to what we've all been used to. How does cakePhp compare to Elgg? Is it fast? Easy to use? Thanks Mark -- Our newest site

Having trouble getting cake bake to work

2011-03-15 Thread Mark Murphy
I've installed the latest version of CakePHP on a Ubuntu 10.10 machine. I was able to run through a beginner tutorial just fine so I think my configuration is close to being correct. I can't get cake bake to completely work though. Below is my session. Things that look like anomolies are marked

Re: Save and Loops

2010-12-30 Thread Mark
-Appointment-validationErrors array for failed data. Please remember to test this with debug level 2 so that it will output errors (if any) as well as SQL queries. Amit Badkas PHP Applications for E-Biz:http://www.sanisoft.com On Wed, Dec 29, 2010 at 2:44 PM, Mark mark.anthony.e.san

Save and Loops

2010-12-29 Thread Mark
in advance, Mark //PHP Code Starts Here $program = $this-Enrollment-Program-read(null, $this- data['Enrollment']['program_id']); for($i=1;$i=$program['Program']['no_of_appointments'];$i++) { $appointment = array( 'appointment_no' = $i

saveAll() only saves record with Alpha not digits.....

2010-06-21 Thread Mark Winney
0 Any help is appreciated. I do not understand why is only saves the Param rows where the value is alpha, and does not even appear to attempt to save rows where the Param.value is a numeric. Thanks Mark Check out the new CakePHP Questions site http://cakeqs.org and help others

SaveAll Saving to Join Table?

2010-04-06 Thread Mark
I got a pretty simple setup here, but can't seem to get the data to save automatically (like its supposed to). Any guidance would be appreciated... I have two models: contacts and phones. Contacts HABTM phones and vice versa... contacts_controller.php class ContactsController extends

Re: SaveAll HABTM Saving to wrong tables...

2010-04-06 Thread Mark
Thanks to both you and nurzvy. You are right - the reason I need a HABTM relationship is that two people can share the same phone number. So the only way to do this (once I get the actual syntax right) will be to save the phones first, gather their ID's, and reformat the data array, and then do

Re: Fatal memory allocation error at cleanup on production server only

2010-03-14 Thread Mark Hindley
('include_path')); ? Thanks for your help Mark Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php

Re: Fatal memory allocation error at cleanup on production server only

2010-03-13 Thread Mark Hindley
installation, I will need to be able to produce a short test case that reproduces it. Mark Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post

Re: Fatal memory allocation error at cleanup on production server only

2010-03-13 Thread Mark Hindley
On Sat, Mar 13, 2010 at 11:53:58AM +, Jon Bennett wrote: can you install xdebug? http://xdebug.org/ The production server is on cpanel so I don't think I can directly. I have just asked the hosting provider to consider it. Cheers, Mark Check out the new CakePHP Questions site http

Re: Fatal memory allocation error at cleanup on production server only

2010-03-13 Thread Mark Hindley
on this particular system, unfortunately that is the production server! Mark Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send

Re: Fatal memory allocation error at cleanup on production server only

2010-03-13 Thread Mark Hindley
. And if it is a configuration issue, it still may not trigger the error. Mark Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake

Re: Fatal memory allocation error at cleanup on production server only

2010-03-12 Thread Mark Hindley
, so it doesn't appear to be that. Any other suggestions of how to get a handle on this? My understanding is you can't trap Fatal Errors like this to get a backtrace. The error message doesn't give a location. I don't even know where to start looking! Cheers, Mark Check out the new CakePHP

Re: Fatal memory allocation error at cleanup on production server only

2010-03-12 Thread Mark Hindley
with no error. Mark Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com

Re: Fatal memory allocation error at cleanup on production server only

2010-03-11 Thread mark
On 6 Mar, 21:58, mark m...@hindley.org.uk wrote: Hi, I have a cakephp app that has started to throw a Fatal Memory allocation error. Strangely it only happens on the production server (Cpanel, php 5.2.12) but not on either dev machines (php 5.2.11). This is with CakePHP version 1.2.4.8284

SaveAll HABTM Saving to wrong tables...

2010-03-09 Thread Mark
START TRANSACTION 0 0 2 INSERT INTO `contacts` (`name`, `updated`, `created`) VALUES ('Mark', '1268143497', '1268143497')1 0 3 SELECT LAST_INSERT_ID() AS insertID 1 1 0 4 SELECT `ContactsPhone

Fatal memory allocation error at cleanup on production server only

2010-03-06 Thread mark
help Mark Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from

Re: Announcing CakeXT: Bind CakePHP and ExtJS together

2009-08-27 Thread Mark Tannenberg
Hi I started using this project and I guess I still have to grasp the concept of ExtJs coding ... I wonder, would it be possible to use this in a different environment than just the 3 tabs you mentioned? Regards On 25 Aug., 10:23, technicaltitch technicalti...@gmail.com wrote: Very exciting!

Re: Forcing new lines in a view.

2009-07-25 Thread Mark
define('LF', \n); or even define('LF',PHP_EOL); in bootstrap (last one uses the php internal constant) now you can globally use echo LF.$html-meta(...).LF.LF; as oven as you want in your layouts :) On 25 Jul., 13:29, majna majna...@gmail.com wrote: echo $html-meta(...). \n\t; On Jul 25,

Re: Forcing new lines in a view.

2009-07-25 Thread Mark
as often.. :) besides i even defined define('TB',\t); // tabulator define('BR','br /'); // line break On 25 Jul., 14:35, Mark dereurom...@googlemail.com wrote: define('LF', \n); or even define('LF',PHP_EOL); in bootstrap (last one uses the php internal constant) now you can globally use

Re: unsigned column types

2009-07-24 Thread Mark
nope i always use unsigned ints - auto incr int(10) - tinyint(1) toggles - tinyint(2) enumeration fields etc only the cake bake schema seems not to like it but its buggy anyway (comments and other special attributes get lost) hopefully, this won't be a problem in the future On 24 Jul., 22:19,

Re: Component inside helper

2009-07-22 Thread Mark
i sometimes have to use a helper in a component and otherwise to avoid duplicating code (DRY principle) i guess thats why you need to do that too (otherwise you shouldnt) in this case, though, use App::import(): Helper: function xyz() { App::import('Component', 'Some'); $this-Some = new

Re: Captcha validation in model

2009-07-22 Thread Mark
i once tried to implement this as behavior the interesting aspect: everything happens in one place (except for the view part which should be done by some helper): - creating new captcha, passing it to controller in afterFind(), passing it to view - displaying it there through helper (maybe some

Re: javascript - link in element doesnt work

2009-07-22 Thread Mark
usually you can use helpers in elements only, if you have added them through your app controller (global) $helpers array otherwise you may have to include them some other way On 22 Jul., 09:25, Yannis ikasso...@gmail.com wrote: Hi, I'm including an element in my default layout like this:

Re: Action without View

2009-07-22 Thread Mark
$this-autoRender = false; in this action On 22 Jul., 09:29, Mohsen Taheri mohsen.tah...@gmail.com wrote: How to create an action controller without view? I have a Ajax request to a one action, and I want to work in background, I done it completely, but it makes me to create a blank view

Re: Form helper not populating fields with accents

2009-07-22 Thread Mark
. Weird. On Jul 22, 1:00 am, Mark dereurom...@googlemail.com wrote: use utf8 throughout your website saves you usually a lot of trouble :) On 21 Jul., 23:34, Xoubaman xouba...@gmail.com wrote: Hello I'm having problems with theformhelper. When afieldcontains chars like ñ

Re: Alternate return values for null.

2009-07-22 Thread Mark
sure... in the model in the afterFind() callback: if (empty($xyz)) { $xyz = 'No Motto';} On 23 Jul., 00:12, David da...@reflashed.com wrote: Let's say I have a User model and they have on Profile model.  Within the profile model there is a motto field.  If the model field is null, is there

Re: can I get the info of user in a model?

2009-07-21 Thread Mark
check this out: http://github.com/mcurry/cakephp_static_user/tree/master On 21 Jul., 06:32, Rimoe meiyo...@gmail.com wrote: hi, everyone! I have use ($this-Auth-user()) to get the log in info in controller. but now I want to get the info of user in a model. because the method of model

Re: How to overwrite database fields in a model?

2009-07-21 Thread Mark
i guess i will have to show you my little secret - how it can be achieved in a very neat way in your Model: /** Static Enums **/ /** * Static Model::method() * BILL STATUS */ function statuses($value = null) { $options = array(

Re: Form helper not populating fields with accents

2009-07-21 Thread Mark
use utf8 throughout your website saves you usually a lot of trouble :) On 21 Jul., 23:34, Xoubaman xouba...@gmail.com wrote: Hello I'm having problems with the form helper. When a field contains chars like ñ or vocals with accent, the value is not set to the corresponding input. ie,

Re: Image AND Text in image helper

2009-07-19 Thread Mark
as you would normally join them (with a dot): $html-link($html-image(logo/easy_logo_trans.png, array()).'xxx SOME TEXT xxx','/', array ('escape'=false)); On 19 Jul., 13:47, matzeh...@googlemail.com matzeh...@googlemail.com wrote: Hi, [code] $html-link($html-image(logo/easy_logo_trans.png,

Re: Composed plural

2009-07-18 Thread Mark
( 'data_comemorativa' = 'datas_comemorativas' ) would be more appropriate than your second approach maybe you have to tweak the pluralization here a little bit mark On 17 Jul., 22:13, Thiago Elias thiagopt...@gmail.com wrote: Hi all, I'm new in cake, and I've been experiencing some problems

Re: App Controller not intialized on error (missing action/controller)

2009-07-16 Thread Mark
not quite right.. the beforeFilter() and afterFilter() functions are not triggered but if you put your code in the beforeRender() it should work On 16 Jul., 09:34, Brendon Gleeson gleeso...@mobilitas.org wrote: I am having a problem, The array for my view's nav menu is built in  

Re: Joomla modules like functionality in CAKE PHP

2009-07-08 Thread Mark
@James: from my experience, using ClassRegistry::init() instead of App::import() creates the model instances only once (so called Singleton Pattern) therefore you dont have that much more memory usage.. using this inside elements might not be MVC like, but it would come close to the above

Re: Redirect Fehler

2009-07-08 Thread Mark
you are aware of the fact that the primary language in this group is english? :) On 8 Jul., 13:54, Jan Ditze jandi...@googlemail.com wrote: Moin Moin, ich fange gerade an eine App mit Cake zu entwickeln. Jedoch bin ich schnell auf einen Fehler gestoßen, den ich mir nicht erklären kann.

Preferred location for app_model.php and app_controller.php

2009-07-02 Thread Daniel Mark
I've seen contradicting information about the preferred location for app_model.php and app_controller.php classes. Baking a new project puts both directly in /app. The documentation is silent about the location of app_model.php, but suggests /app/controllers for app_controller.php. Is there a

Re: Read-Only app

2009-06-30 Thread Mark
? what the heck? just dont have any add/edit actions (methods in the controller)... On 30 Jun., 11:36, Ernesto e.fanz...@gmail.com wrote: Hello i'm baking a read-only app. This app shouldn't save any kind of data. here's my bet ?php class AppModel extends Model {         function

Containable behavior and dual model relationship

2009-06-30 Thread Daniel Mark
I'm having some trouble using Containable with the following model relationship. Suppose an Airplane has two EngineTypes, with the relationships defined like this: class Airplane extends AppModel { $belongsTo = array( 'EngineType' = array( 'className' = 'EngineType',

Re: German Umlaut in form-end

2009-06-22 Thread Mark
just encode all your templates with utf8 and you can normally type äöü etc On 22 Jun., 19:37, Carlos Gonzalez Lavin carloslavi...@gmail.com wrote: To be a bit more file text-encoding safe, u could use the html entity ouml; 2009/6/21 AD7six andydawso...@gmail.com On Jun 21, 5:50 pm,

Re: User Scope error messages

2009-06-05 Thread Mark
just extend the existing Auth Component and override the method that is responsible for the login part that's how i did it On 5 Jun., 07:14, John Andersen j.andersen...@gmail.com wrote: Follow-up, on the second part of your question, displaying a specific message based on which criteria is

Re: Tinyints cause big problems

2009-06-01 Thread Mark
@larry: that was a good one :) i dont think adallas will get very far with his special disk-space- saving-techniques... On 2 Jun., 01:09, Larry E. Masters aka PhpNut php...@gmail.com wrote: I know this is documented and it is part of the CakePHP conventions. Maybe it is time to upgrade your

Re: Forms with math computations and multiple buttons

2009-05-29 Thread Mark
i guess you use cake 1.1 as in 1.2 cake seems not to use $this-params['form'] (always an empty array) mark On 29 Mai, 03:43, espontaneo acohln...@gmail.com wrote: Thanks for answering my questions. The number helper is only for the view right? Can I use it on my component/controller? I have

Re: Can I called CakeLog::write() like this?

2009-05-26 Thread Mark
well, except for the boostrap files of course although, the function is used like this: function write($type, $msg) {} first type, then msg!!! so this might be your problem... with $this-log() its the other way around On 26 Mai, 08:56, Jules fattyju...@gmail.com wrote: I've written a

Re: Can I called CakeLog::write() like this?

2009-05-26 Thread Mark
i usually use $this-log() as everything usually inheritades from object class On 26 Mai, 08:56, Jules fattyju...@gmail.com wrote: I've written a panic() function which resides in config/bootstrap.php, and can be called from anywhere in my CakePHP app.  The idea is that it is called when the

Re: Poll: what do you hate about CakePHP?

2009-05-13 Thread Mark (Germany)
after so many years still too american! no real multi-lingual support for usage in other languages than just englisch e.g. the mb_() function problem i already pointed out 12 months ago with utf8 as default + mb_() functions there wouldn't be any trouble On 13 Mai, 11:57, majna

REST Authentication

2009-05-04 Thread Daniel Mark
Are there any established best practices for authenticating XML based clients via REST? I've searched for information about this with no results. Any recommendations about how to handle authentication and REST are appreciated. Thanks! --~--~-~--~~~---~--~~ You

Re: Reserved words in CakePHP?

2009-04-16 Thread Mark (Germany)
yeah i once proposed to change components into $this-FileComponent-foo() etc with Component attached to prevent this from happening but they did not care about that much in the core team at that point in time :) PS: same with helpers (conflicts between vars from controller): $poll (content

Re: how to validate texbox which is not related to table's field

2009-04-16 Thread Mark (Germany)
if you want to validate by posting, it doesnt matter if those fields are in the DB or not just set up the rules and cake will validate those as well if you want to validate them directly by JS, you have to validate it manually On 16 Apr., 15:56, vikas vikas...@gmail.com wrote: Hello all.. I

Re: Run an action with out a view? Is it possible?

2009-04-14 Thread Mark (Germany)
you forgot one: $this-redirect() as it always ends with exit() anyway but the proper way without redirect would be: $this-autoRender = false (anywhere inside that method in the controller) On 15 Apr., 00:08, Miles J mileswjohn...@gmail.com wrote: You can either do the following: - Have

Re: Run an action with out a view? Is it possible?

2009-04-14 Thread Mark (Germany)
oh, i just relized that this was your first point here^^ my mistake, overread that one On 15 Apr., 00:44, Mark (Germany) dereurom...@googlemail.com wrote: you forgot one: $this-redirect() as it always ends with exit() anyway but the proper way without redirect would

Re: Time helper

2009-04-13 Thread Mark (Germany)
i usually wouldn't use time-format() because it uses date() instead of strftime() the first causes problems with displaying correct i18n results when using other languages than englisch so you have to decide on your own if time-format() is gould enough for you or not On 13 Apr., 05:39, Miles

Re: Reverse LIKE sql statement

2009-04-10 Thread Mark (Germany)
if you want to find an entry whith blue: obviously: WHERE fieldName LIKE '%blue%' OR - if you dont want anything after the word blue: WHERE fieldName LIKE '%blue' On 9 Apr., 23:07, Miles J mileswjohn...@gmail.com wrote: NOT LIKE '%term%' Is that what you mean?

Re: media view and files on the fly

2009-03-31 Thread Mark (Germany)
var and wrote that to a tmpfile. Here's the diff:http://bin.cakephp.org/view/1310700342 -Matthttp://www.pseudocoder.com On Mar 30, 1:05 pm, Mark (Germany) dereurom...@googlemail.com wrote: i tried to use the media view for files generated on the fly (some exported text inside a export.txt

Re: media view and files on the fly

2009-03-31 Thread Mark (Germany)
are you sure it is app_media.php then? i only got it to work by leaving it the same name media.php in /app/ views/ mark On 31 Mrz., 21:45, Mark (Germany) dereurom...@googlemail.com wrote: nice :) thx On 31 Mrz., 15:17, Matt Curry m...@mcurry.net wrote: I had to do this with pdf/xls

media view and files on the fly

2009-03-30 Thread Mark (Germany)
i tried to use the media view for files generated on the fly (some exported text inside a export.txt or whatever) but it seems like the media view can only handle downloads of existing files on the server trying to rewrite it did not turn out very well so, did anyone manage to create a txt file

Re: Using MySql DB instead of PO files

2009-03-27 Thread Mark (Germany)
it is very flexible, additional infos can be attached to the lang strings and you dont lose much speed this works only for __() of course for Database Content to be translated you could use the translate behaviour yours, mark On 26 Mrz., 16:15, Sourabh sourabhmkulka...@gmail.com wrote: Hi I am

Re: debug email address (catchall) for EmailComponent

2009-03-18 Thread Mark (Germany)
i just made myself a new Mailer Component which extends the core one this way you can set default parameters or some debug triggers as well as some convinience functions to easily set up to, cc, etc On 18 Mrz., 16:50, brian bally.z...@gmail.com wrote: On Wed, Mar 18, 2009 at 6:10 AM,

Re: Tree misbehaviour

2009-02-24 Thread Mark
find any real difference. The only one I spotted was the use of int(11) instaed of int(10) for lft, rght and parent_id. Any ideas? Thanks, Mark On Feb 24, 2:35 am, Adam Royle a...@sleekgeek.com.au wrote: What data type are you using for your lft and rght columns? I'm not sure if it will help

Re: Tree misbehaviour

2009-02-24 Thread Mark
name: article_categories Files: admin_add.ctp, admin_index.ctp They seem to follow the CakePHP nameing convention, but I could have missed something. Many Thanks, Mark On Feb 24, 12:53 pm, AD7six andydawso...@gmail.com wrote: On Feb 24, 1:11 pm, Mark markk...@gmail.com wrote: Hi Adam

Re: Tree misbehaviour

2009-02-24 Thread Mark
$name: ArticleCategory Views Directory name: article_categories Files: admin_add.ctp, admin_index.ctp They seem to follow the CakePHP naming convention, but I could have missed something. Many Thanks, Mark On Feb 24, 1:27 pm, Mark markk...@gmail.com wrote: Hi AD7six, I have the following setup

Tree misbehaviour

2009-02-23 Thread Mark
sense… I’m shattered ;) Thanks, Mark --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php

Re: combination of validation in model and behaviour?

2009-02-21 Thread Mark (Germany)
On 20 Feb., 22:06, Mark (Germany) dereurom...@googlemail.com wrote: well, this is easy - of course :) but i'd really apprechiate if it would be possible the way described above as it is very flexible to add captchas in the view echo $captcha-input(); in the controller ...-Behaviors-attach

  1   2   >