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

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 Us

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 applicat

Re: Problem with afterFind for associated tables

2012-11-19 Thread Mark Wratten
d' => ... , 'Town' => array('id' => ...)) 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 ar

Problem with afterFind for associated tables

2012-11-19 Thread Mark Wratten
terFind is called before the queries for its associated tables are run. I'm 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 Twitte

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 rec

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

2012-09-04 Thread Mark Wratten
mary 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 for that job login or news list,

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

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

Re: Subquery in join clause in CakePHP 2.2

2012-08-28 Thread Mark Wratten
to like the new abilities of Cake and you can really minimize the amount of SQL you need to put in your code. Disclaimer - there may be better ways to do the same thing that I have not thought of. Mark On Tuesday, August 28, 2012 12:08:38 PM UTC-4, ceap80 wrote: > > Hi Mark,

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 gen

Subquery in join clause in CakePHP 2.2

2012-08-27 Thread Mark Wratten
g tables 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 &quo

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

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 ne

Need help with reverse routing

2012-08-10 Thread Mark Wratten
irection, but the URL generated by PaginatorHelper in the previous case now generates the URL in the form - /ajax/pages/display/... So How do you tell the reverse routing which rule to use? If I need to resort to a custom router, how do you tell the the Cake rendering functions to use t

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 dinam

How override base URL in PaginatorHelper

2012-08-09 Thread Mark Wratten
ter? 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://grou

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: > > Gen

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)) + cos(radians

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 pre

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 no

Re: Is there a lighter weight alternative to requestAction?

2012-06-29 Thread Mark Wratten
y, caching is important and we do do 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 questio

Re: Is there a lighter weight alternative to requestAction?

2012-06-28 Thread Mark Wratten
the fly. 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 Ca

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

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: Slightly different models, merge or separate?

2012-06-27 Thread Mark Wratten
thing 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, >

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 Wednesda

Is there a lighter weight alternative to requestAction?

2012-06-27 Thread Mark Wratten
her anyone 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

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 c

How get Exception Handler to use plugin layout?

2012-06-21 Thread Mark Wratten
;t know how 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.cakep

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
://github.com/cakephp/cakephp/commit/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 questio

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 wi

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 wi

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" wrote: > Hey Mark, > > I can't answer all your questions, but the follow

Re: Elgg v CakePhp

2011-09-22 Thread mark kelly
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, 201

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

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

2011-09-21 Thread mark kelly
27;s worth 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-ph

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 wit

Re: Save and Loops

2010-12-30 Thread Mark
->Enrollment->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,

Save and Loops

2010-12-29 Thread Mark
. Thank you 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++) { $appoi

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

2010-06-21 Thread Mark Winney
7;2010-06-20 22:12:21', '2010-06-20 22:12:21') 1 1 7 SELECT LAST_INSERT_ID() AS insertID 1 1 1 8 ROLLBACK0 0 Any help is appreciated. I do not understand why is only saves the Param rows where the va

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 a

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 AppContro

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

2010-03-14 Thread Mark Hindley
OK, I have tracked down a minimal test case and it seems to be nothing to do with CakePHP. So sorry for the noise. Just FYI, the following minimal php script produces the Fatal error, even outside CakePHP, so it seems to be something in the php installation. Thanks for your help Mark Check

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

2010-03-13 Thread Mark Hindley
ox will be tricky. 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 "CakeP

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

2010-03-13 Thread Mark Hindley
valent error. It only seems to be happening 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 th

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 s

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

2010-03-13 Thread Mark Hindley
the php 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&qu

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

2010-03-12 Thread Mark Hindley
side CakePHP? Other php scripts on the server run 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" grou

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

2010-03-12 Thread Mark Hindley
g is output, 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,

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

2010-03-11 Thread mark
On 6 Mar, 21:58, mark 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.

SaveAll HABTM Saving to wrong tables...

2010-03-09 Thread Mark
;); echo $form->input('Phone.0.number'); echo $form->end('Save'); ?> The result? 1 START TRANSACTION 0 0 2 INSERT INTO `contacts` (`name`, `updated`, `created`) VALUES ('Mark', '1268143497', '1268143497&#

Fatal memory allocation error at cleanup on production server only

2010-03-06 Thread mark
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@googlegroups.com To u

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 wrote: > Very exciting! > > On Aug 24, 11:18 am,

Re: Forcing new lines in a view.

2009-07-25 Thread Mark
as often.. :) besides i even defined define('TB',"\t"); // tabulator define('BR',''); // line break On 25 Jul., 14:35, Mark wrote: > define('LF', "\n"); or even define('LF',PHP_EOL); > in bootstrap (last one uses the

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 wrote: > echo $html->meta(...). "\n\t"; > > On Jul 25, 10:55 am, S

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: 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 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 anyway in the Pr

Re: Form helper not populating fields with accents

2009-07-22 Thread Mark
27;]); > >         echo $form->text('Profile.last_name',array('label' => false)); > > ?> > > > > One text input using theformhelper and another one typing it > > "classically". You can see an output screen capture > > a

Re: Action without View

2009-07-22 Thread Mark
$this->autoRender = false; in this action On 22 Jul., 09:29, Mohsen Taheri 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 for it. --~--~---

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 wrote: > Hi, > I'm including an element in my default layout like this: > $this->element('n

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: 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 SomeC

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 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, $this->data is >

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: 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 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 has been use

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" wrote: > Hi, > > [code] > $html->link($html->image("logo/easy_logo_trans.png", array("alt

Re: Composed plural

2009-07-18 Thread Mark
egularPlural = array( '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 wrote: > Hi all, > > I'm new in cak

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 wrote: > I am having a problem, > > The array for my view's nav menu is built in  app/app_controller.php, > when

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 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. > > Wenn ich auf dieser

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 "Joom

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 p

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', 'foreig

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 wrote: > Hello > > i'm baking a read-only app. This app shouldn't save any kind of data. > > here's my bet > > > class AppModel extends Model { >         function beforeSave ($optio

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 wrote: > To be a bit more file text-encoding safe, u could use the html entity ö > > 2009/6/21 AD7six > > > > > On Jun 21, 5:50 pm, Braindead wrote: > > > Hi, how can I use a G

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 wrote: > Follow-up, on the second part of your question, displaying a specific > message based on which criteria is not fulfilled! > I don'

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" wrote: > I know this is documented and it is part of the CakePHP conventions. > Maybe it is time to upgrade your 1.44 floppy

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 wrote: > Thanks for answering my questions. The number helper is only for the view > right? Can I use it on my component/controller? I

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 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 site admin (me

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 wrote: > I've written a panic() function which re

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 wrote: > Th

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 r

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 wrote: > Hello all.. > > I have a task lis

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 (conten

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)" wrote: > you forgot one: > > $this->redirect() > > as it always ends with exit() anyway > > but the proper way without redirect would

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 wrote: > You can either do the following: > > - Have the delete action r

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 wrote: > NOT LIKE '%term%' > > Is that what you mean? > > http://dev.mysql.com/doc/refman/5.0/

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)" wrote: > nice :) > thx > > On 31 Mrz., 15:17, Matt Curry wrote: > > > I had to do this wi

Re: media view and files on the fly

2009-03-31 Thread Mark (Germany)
nt view 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)" > wrote: > > > i tried to use the media view for files generated on the fly (som

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)
way 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 wrote: > Hi > > I am developing

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 wrote: > On Wed, Mar 18, 2009 at 6:10 AM, gianpaulo wrote: > > > How

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 wrote: > Hi AD7six, > > I have the following setup:

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 wrote: > On Feb 24, 1:11 pm, Mark wrote: > > > > > Hi Adam, > > > I

Re: Tree misbehaviour

2009-02-24 Thread Mark
and can't 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 wrote: > What data type are you using for your lft and rght columns? > > I'm not sure if

Tree misbehaviour

2009-02-23 Thread Mark
hope this post makes 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 t

Re: combination of validation in model and behaviour?

2009-02-21 Thread Mark (Germany)
20 Feb., 22:06, "Mark (Germany)" 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();

  1   2   3   >