Re: Pagination with recursion while using loadModel

2011-03-19 Thread euromark
have you tried var $uses = array('Transaction'); PS: why is your model Transactions??? and not Transaction? On 19 Mrz., 07:26, "ashok.b" wrote: > Hi, In my "Reports" controller, which is just a dummy controller > without any actual database, I'm trying to generate a paginated view > of other mo

Re: Is there any good documentation on $form->inputs()?

2011-03-18 Thread euromark
i think there is pretty much everything covered... http://book.cakephp.org/view/1390/Automagic-Form-Elements On 18 Mrz., 20:19, Parris wrote: > Everytime I use it (and I really love using it), I need to look up > info about it. It is no problem with datatime, text, textfields, and > checkboxes;

Re: Google Maps API

2011-03-17 Thread euromark
http://www.dereuromark.de/2010/12/21/googlemapsv3-cakephp-helper/ On 17 Mrz., 16:30, "Dr. Tarique Sani" wrote: > http://bakery.cakephp.org/articles/rajibahmed/2010/11/20/cakephp_goog... > > ^ Open, read, try and come back if you have questions > > Cheers > Tarique > > > > > > > > > > On Wed, Mar

Re: How do you validate money values?

2011-03-16 Thread euromark
i use a behavior which transforms values like "22,23" into "22.23" before validation kicks in On 16 Mrz., 15:38, heohni wrote: > If its not american format? > Does someone has a rule for german money amounts and the comma/dot > issue? -- Our newest site for the community: CakePHP Video Tutoria

Re: how to make /app/tmp folder web writable

2011-03-16 Thread euromark
on windows you dont need to already 777 by default because there is no such rights management just avoid placing your code on c:/ in win7 this can cause other issues so always try to use another partition On 16 Mrz., 11:54, varai wrote: > I tried the following, > > The final task is to make the

Re: obfuscate hash form ids

2011-03-15 Thread euromark
s and make it harder for people trying > > to spam me  or hack it > > > On Mar 14, 5:08 pm, euromark wrote: > > > > the question is > > > what do you want to achieve with this? other than making your life a > > > hell of a lot more

Re: obfuscate hash form ids

2011-03-14 Thread euromark
the question is what do you want to achieve with this? other than making your life a hell of a lot more difficult as a developer On 14 Mrz., 23:45, arron wrote: > I have a form > >                  create(info );?> >                 input('FirstOwner.fname');?> >                 input('FirstOwner

Re: Auto Increment A Field

2011-03-13 Thread euromark
nice catch :) i guess thats true additionally, updateAll() doesnt trigger any callbacks like beforeSave() or afterSave(). probably a good thing in this case, as well On 13 Mrz., 23:06, Ryan Schmidt wrote: > Nick, that code has a race condition. Two different users looking at the page > at the s

Re: Case sensitivity in LIKE searches

2011-03-13 Thread euromark
you should be using utf8_unicode_ci (ci stands for case ins.) then it should be no problem and the search is always ci! On 13 Mrz., 14:16, heohni wrote: > Hi, > > SELECT .. FROM `members` AS `Member` WHERE `Member`.`email` LIKE > '%Hans%' > > When I search for "Hans", I find a entry, if I se

Re: Weird Observation

2011-03-12 Thread euromark
a quick note: it is not a good thing to have both plain and www access to your site redirect from domain.com to www.domain.com (301) On 12 Mrz., 20:06, "Krissy Masters" wrote: > Not even sure how to ask this question. > > Building forgot password function and it was working. > Then today go back

Re: Readonly field

2011-03-11 Thread euromark
http://www.dereuromark.de/2010/06/23/working-with-forms/ paragraph "Default Values – hidden!" or "Disallowing some fields to be edited" cheers mark so simply pass the record along to the view and echo it (without any form) On 11 Mrz., 12:46, AD7six wrote: > On Mar 11, 12:44 pm, AD7six wrote

Re: Building spell check into forms

2011-03-11 Thread euromark
nice link - I like the afterthedeadline-style almost better and more powerful as google I would assume and it seems to come with a jquery plugin :) On 11 Mrz., 09:28, chris wrote: > Thanks for the suggestion, I will take a look into it. > > In regards to the previous post about why I would bothe

Re: Custom Order by

2011-03-07 Thread euromark
you can chain order statements: order=>array('featured'=>'DESC', 'created'=>'DESC') etc On 7 Mrz., 07:15, Eric Anderson wrote: > Hi everyone, > > I was wondering if you could help me with this strange ordering issue. > I have a list of posts and I want to order them by date created, > however,

Re: redirect trouble

2011-03-05 Thread euromark
in cake2.0 my ticket has now been implemented fixing your problem :) until then you might want to use the workaround I mentioned: http://cakephp.lighthouseapp.com/projects/42648/tickets/1418-form-should-always-post-to-itself-as-default On 5 Mrz., 15:11, Sam Bernard wrote: > It's not working beca

Re: On the road to Da Vinci 2.0

2011-03-04 Thread euromark
jesus isn't it said that such spam threads get more attention and replies than most of the normal "cakephp" related topics? :) and well - i certainly call it SPAM - regardless of the mother tongue of the author like Sam said, it has been posted all over the www with copy-and- paste...^^ On 4 Mrz

Re: How to properly use "conditions" in model associations

2011-03-02 Thread euromark
i agree with gremlin foreign_key + model is an example for this everything else i would set right inside the querying model method On 2 Mrz., 23:06, gremlin wrote: > I tend to define conditions in associations on very few occasions. One > good use is for polymorphic models (you need to define t

Re: cakephp Messaging sysytem

2011-02-28 Thread euromark
ve worked on such an environments before with very high traffic and very > large amount of data and after pulling our hairs off to boost the > performance we saw that IMAP was the best solution ever for this kind of > tasks > > Ma'moon > > On Wed, Feb 23, 2011 at 8:08 PM,

Re: Allow empty selection for relationship id (NULL)

2011-02-27 Thread euromark
$options[] = "'timeFormat'=>24"; } $options = implode(', ', $options); echo "\t\techo \$this->Form->input('{$field}', array({$options})); \n";

Re: Rendering a view without layout

2011-02-27 Thread euromark
@jitka you mean $this->autoRender = false; ^^ On 27 Feb., 12:49, Tilen Majerle wrote: > wtf?? > -- > Lep pozdrav, Tilen Majerlehttp://majerle.eu > > 2011/2/27 Brie > > > > > > > > > $this->layout = false; > > > worked for me :) > > > -- > > Our newest site for the community: CakePHP Video Tut

Re: Fat Models vs. App Controller

2011-02-26 Thread euromark
usually you would put functions you use in multiple controllers in either the model (data?) or a component (logic?) you can also use libs to "dry" your code :) On 27 Feb., 00:02, Eric Anderson wrote: > Hi everyone, > > Just wondering when it comes to performance and any other factors you > may d

Re: Search function

2011-02-25 Thread euromark
@Krissy Masters instead of 25 single queries you could probably use a "group by" statement and a single query :) but nice idea, though On 25 Feb., 15:43, MeatSandwich wrote: > Hey acl68, thanks for that, definitely does point me in the right > direction. I need to go off and brush up a bit on my

Re: Numeric vs integer vs digit validation

2011-02-24 Thread euromark
i agree that it wouldnt hurt to specify the rules for numeric values a little bit more precisely :) if you provide a ticket and a patch, i am sure it will be considered for 2.0 On 24 Feb., 09:19, Ryan Schmidt wrote: > On Feb 14, 2011, at 10:12, John Andersen wrote: > > > You always have the oppo

Re: cakephp Messaging sysytem

2011-02-23 Thread euromark
', `last_view` int(10) unsigned NOT NULL DEFAULT '0', `created` datetime NOT NULL, PRIMARY KEY (`id`), KEY `user_id` (`user_id`), KEY `conversation_id` (`conversation_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=110 ; On 23 Feb., 21:31, Jo

Re: Update Display Fields

2011-02-23 Thread euromark
yes there is: $model = $this->Model->find() // data validation and save if (empty($this->data)) { $this->data = $model; } $this->set(compact('model)); you can now work with $model array in the view (contains all fields) On 23 Feb., 21:34, Pekkle wrote: > I have a table that i did two

Re: Urgent Help--Please

2011-02-20 Thread euromark
john is still right, though the data should be finalized in the view this way you can customize it better simply use a "csv" layout (settings headers) which uses the custom csv view you generate (using a csv helper). On 20 Feb., 16:51, John Andersen wrote: > This is speculation only, but maybe

Re: Where to put my own php classes and how to call them

2011-02-19 Thread euromark
for your sencod problem read about "libs" in cake1.3 thats the way to go with own custom classes /libs/my_class.php with MyClass class App::import('Lib', 'MyClass'); On 19 Feb., 19:09, "Krissy Masters" wrote: > You're better off using Plugins, "Support for vendor assets have been > removed for

Re: Created and Modified Dates don't auto populate on HABTM

2011-02-17 Thread euromark
yep you will need to develop your own HABTM behavior that will take care of that because john is right, in the default HABTM table, only the primary keys of the two joined tables are allowed something I regretted as well in the past but you can easily work around it - manually :) On 17 Feb., 22:1

Re: How much to charge?

2011-02-16 Thread euromark
its a suggestive question like "what car should i bye" plus its not even remotely cake related so nobody in this group will probably be able to help you with this... On 16 Feb., 23:17, hydra12 wrote: > I've been offered a one-time job to develop a database driven form for > someone's website.

Re: Validation Question

2011-02-16 Thread euromark
you are mixing cake pretty urls and plain url style why not going with /.../x:1/y:2/z:3 and using $this->params[named] ? if you don't mind my asking On 16 Feb., 12:49, Tapan Thapa wrote: > Hello Community, > > I want to create a url like this. > > http://localhost/cakephp/incomings/request/?ms

Re: Create when not existing.

2011-02-16 Thread euromark
i can see that you are new to cake :) a few hints for the beginning dont use find(all) for those things - find(first) will do the trick if you look for a (unique) record (by name in this case) you also start to use $data without initializing it this can cause warnings init: $data = array(); befo

Re: Same code in controller, model and view

2011-02-16 Thread euromark
this is one downside of the current "helper" style for dates etc the time helper needs to be manually included in the controller etc (with dependencies inside the helper causing trouble sometimes) so i agree with you that the situation is not perfect right now i would like the following DRY approa

Re: database.php.default, extra comma at the end?

2011-02-15 Thread euromark
i'd say it is totally irrelevant :) On 15 Feb., 20:08, MissYeh wrote: > Whether you leave it or not should not matter. PHP can handle both. Whether > is a good practice to leave or remove it is a different topic :) -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp

Re: $this->Html vs $html

2011-02-15 Thread euromark
ähm... search?! just two days ago: http://groups.google.com/group/cake-php/browse_thread/thread/07b13c34e8950c46# On 15 Feb., 19:18, Tan Cheng wrote: > Hi everyone, > > I'm a newbie to cakePHP, a question I always have is in the tutorial > in 1.3 cookbook, the html helper always appears as "$th

Re: $html versus $this->Html (is it the same?)

2011-02-13 Thread euromark
there are several IDEs which you can easily tweak to autocomplete correctly i use phpdesigner: http://www.dereuromark.de/2010/09/22/setting-up-phpdesigner-for-cakephp/ script: http://www.dereuromark.de/2010/06/28/code-completion-console-script/ On 13 Feb., 19:52, cricket wrote: > On Sun, Feb 1

Re: How to capture the operator from URL post

2011-02-12 Thread euromark
> > On Sat, Feb 12, 2011 at 10:57 AM, euromark wrote: > > > > > > > > > > and < usually not allowed in > > and they especially are no operaters in this context > > the only operators in an url are > > in php in general / and & and = and ? &g

Re: Inclusive range validation

2011-02-12 Thread euromark
i agree with you - that it would be more intuitive maybe you should repost the ticket then a param "exclusive"=>true (default false, of course) could still make the current behavior available :) if needed at all On 13 Feb., 02:04, Ryan Schmidt wrote: > I was surprised to discover that the "range

Re: How to capture the operator from URL post

2011-02-12 Thread euromark
> and < usually not allowed in and they especially are no operaters in this context the only operators in an url are in php in general / and & and = and ? and in cake / and : if you want to use "greater" or "less" you will need to encode it some way to decode it afterwards. operation:lt or operati

Re: HOW TO DO THIS.

2011-02-12 Thread euromark
> jeremybu...@classoutfit.comhttp://www.classoutfit.com > > > > On 12 Feb 2011, at 04:24, sanjib dhar wrote: > > > > > "HOW TO DO THIS" is not an appropriate title for your thread! > > > > by the way > > > >

Re: User to change password

2011-02-11 Thread euromark
even better: use $this->Auth->password() from the auth component (if you use it) On 11 Feb., 23:21, Ryan Schmidt wrote: > On Feb 11, 2011, at 00:13, Ed wrote: > > > I am new to Cake but, am diving in head first... I've tried several > > different types of coding examples on how to allow a User t

Re: WS - Security I

2011-02-11 Thread euromark
what is "ws security level I"? On 11 Feb., 13:23, Wils wrote: > Hi all, > > Please, how could I implement ws security level I in cakephp? > Is there any component? Behavior? I've been looking at the book without > success :( > > Tkx > Wils -- Our newest site for the community: CakePHP Video Tu

Re: HOW TO DO THIS.

2011-02-11 Thread euromark
"HOW TO DO THIS" is not an appropriate title for your thread! by the way On 11 Feb., 18:27, sanjib dhar wrote: > What will be the function like?Can you please send me.I am new in cakephp. > > > > > > > > On Fri, Feb 11, 2011 at 6:55 PM, Mattijs wrote: > > Well, > > > You can't sum price directly

Re: pagination in controller

2011-02-11 Thread euromark
why didnt you try it? On 11 Feb., 04:44, "chris...@yahoo.com" wrote: > Hi guys,... > a ??? > How can I have two or more pagination in same controller? > if I put to together like this, ... will it work? > >   var $paginate = array('order' => array('Gift.created' => 'desc')); > >   var $paginate =

Re: Global Variable

2011-02-10 Thread euromark
but yes, miles is right - in this case you could simply put in your bootstrap.php On 10 Feb., 11:24, euromark wrote: > usually there are "bound" to a specific model (as an enum > etc):http://www.dereuromark.de/2010/06/24/static-enums-or-semihardcoded-at... > > On 10 Feb.,

Re: Global Variable

2011-02-10 Thread euromark
usually there are "bound" to a specific model (as an enum etc): http://www.dereuromark.de/2010/06/24/static-enums-or-semihardcoded-attributes/ On 10 Feb., 02:13, "Krissy Masters" wrote: > Quick question. > > I have 3 types / classifications of "NEW" > > Brand new = less than 24 hours > New more t

Re: Problems using unbindValidation

2011-02-09 Thread euromark
put your method in app_model.php! On 9 Feb., 15:48, John Andersen wrote: > Note that you state: > > > in my app_controller I put the function: > > and then you use the function as: > > >         $this->User->unbindValidation('keep', array('usr_vorname', > > 'usr_nachname'), true); > > In my eyes

Re: how to log php errors with debug = 0

2011-02-08 Thread euromark
for "appi" i should probably mention that it is possible to log fatal errors inside cake: http://www.dereuromark.de/2010/08/28/useful-hidden-functions/ milos - this thread is quite old, though :) On 8 Feb., 14:52, milos wrote: > For me the error was in views/elements/tiny_mce but I could only

Re: php statement is_set or array_key_exist ??

2011-02-08 Thread euromark
!empty() On 8 Feb., 05:37, Ed Propsner wrote: > I won't get into the actual coding on how to do it but it's quite simple > really. > One approach is -> User $hasMany Favorites > > When loading a page that contains the possible "favorite" > have the controller use containable behavior and pass > t

Re: array_key_exists php statement

2011-02-07 Thread euromark
you should also use empty() instead of !is_null On 7 Feb., 10:21, Amit Badkas wrote: > Hi, > > Off topic, for performance improvement, use isset() instead of > array_key_exists() > > Amit Badkas > > PHP Applications for E-Biz:http://www.sanisoft.com > > On Mon, Feb 7, 2011 at 12:52 PM, chris...@

Re: why sometimes i have to specify the field name otherwise i won't get the resule?

2011-02-04 Thread euromark
there must have something else involved here the fields have nothing to do with the behavior you are describing at least not in any query as simple as yours^^ and by the way: it's "account_id" not accounts_id - see the manual for details On 4 Feb., 18:30, cake-learner wrote: > Time to time I n

Re: Logging of PHP fatal errors not working

2011-02-04 Thread euromark
you can easily override the shutdownfunction in your bootstrap.php register_shutdown_function('shutdownFunction'); /** * own shutdown function * 2010-10-17 ms */ function shutDownFunction() { $error = error_get_last(); if ($error['type'] == 1 && class_exists('CakeLog')) {

Re: A facelift for the CakePHP Book

2011-02-03 Thread euromark
and now has a 500 - internal error :) On 3 Feb., 13:11, Graham Weldon wrote: > The CakePHP Book[1] has undergone a major facelift and incorporates a > whole range of changes to make the book more accessible and usable for > all our users. > > The CakePHP Book[1] has held its previous design and

Re: Blog example not working - need edit in View

2011-02-02 Thread euromark
i am guessing its the cake1.3 bug do you use ANY variable in the view called $html? it destroys both $html and $this->Html helper objects @Jeremy "If so, they override the defaults, which means that the Html helper is not loaded" what version are you referring to? cake usually joins both app and

Re: Cake loads FALSE values as "" (empty)

2011-02-02 Thread euromark
happens and its "euromark" - i am not for sale ;) On 2 Feb., 21:42, Tilen Majerle wrote: > euromarket...yes you are right, i made a mistake because i was think for 2 > possible values, that's was a reason, why i put "2" in brackets instead of > "1

Re: display user ID

2011-02-02 Thread euromark
dont use a hidden field it can easily manipulated :) if (!empty($this->data)) { $this->Product->create(); $this->data['Product']['user_id'] = $this->Session- >read('Auth.User.id'); if ($this->Product->save($this->data)) { ... } ... } On 2

Re: Cake loads FALSE values as "" (empty)

2011-02-02 Thread euromark
nope, tilen its tinyint(1) !!! ideally unsigned (cant be negative anyway) thats what booleans are stored as tinyint(2) is for "pseudo" enum fields or small integer values On 2 Feb., 15:05, Tilen Majerle wrote: > for values like this, cake uses in database tinyint(2) fieldtype, where 1 > means

Re: Why some classes starts with Cake, others not?

2011-02-02 Thread euromark
ep, extending classes is probably easier with such naming, but > shouldn't be all classes refactored to start with 'Cake'? > Now it is a bit inconsistent I think... > > On 2 Lut, 01:45, euromark wrote: > > > > > > > > > its easier to extend the

Re: Why some classes starts with Cake, others not?

2011-02-01 Thread euromark
its easier to extend them if you ever need a custom class Route extends CakeRoute etc would not be possible with "Route" right away but - in those cases you could then use AppRoute extends Route so in the end it probably doesnt matter :) but since it is part of the core, why not declaring its b

Re: Internationlization Doesn't Seem to Work.

2011-02-01 Thread euromark
where did you get that it's "ger" and not "deu"? On 2 Feb., 00:52, Salines wrote: > Do you have other files in the app/locale/ger/LC_MESSAGES/ ?? > > On 1 velj, 01:21, andrewperk wrote: > > > > > > > > > Hello, I'm trying to get my application to use a different language > > using cake's i18n.

Re: Allow empty selection for relationship id (NULL)

2011-02-01 Thread euromark
ntroversial you should provide a complete "patch" in order to get your ticket approved without lots of debating. but you would have my vote. mark On 1 Feb., 14:35, Ryan Schmidt wrote: > On Jan 24, 2011, at 17:37, euromark wrote: > > > On 25 Jan., 00:14, Ryan Schmid

Re: Is there any way to incldue all models automatically

2011-01-27 Thread euromark
believe me, you don't wanna do that... what exactly is "I run to the model issue so many times" On 28 Jan., 00:03, cake-learner wrote: > Is there any way to include all models by default. I run to the model > issue so many times defining the relationship so i just want to join > manually so i c

Re: Select Box - Table or Tinyint?

2011-01-25 Thread euromark
Model::CONSTANT in your code which improves readability (using integers directly is a bad coding habit). defined at the very bottom of a model this does not hurt - in my opinion and thats where I put them :) On 25 Jan., 20:57, Stephen wrote: > I've decided to use your method euromark,

Re: Select Box - Table or Tinyint?

2011-01-25 Thread euromark
s If anyone finds a solution, drop me a line. On 25 Jan., 18:50, kdubya wrote: > @euromark - what a cool solution. I struggles with this same question > and I think you hit on a great alternative. > > Ken > > On Jan 24, 7:27 pm, euromark wrote: > > > > >

Re: How to make random user names out of list of a list of names in a text file, I can not complete my php script

2011-01-25 Thread euromark
i meant cakephp^^ not php On 25 Jan., 13:21, andy_the ultimate baker wrote: > hi, > first thing is u r very much confusing about ur sayings. do seprate > the things u want to do, rather to to solve entire problem at a time, > u need to devide it and then go step by step. > > second thing in ur co

Re: How to make random user names out of list of a list of names in a text file, I can not complete my php script

2011-01-25 Thread euromark
foreach ($lines as $line) $lines is not even defined? omg!? php has nothing to do with magic (although some say it is automagic^^) On 25 Jan., 13:21, andy_the ultimate baker wrote: > hi, > first thing is u r very much confusing about ur sayings. do seprate > the things u want to do, rather to

Re: Allow empty selection for relationship id (NULL)

2011-01-24 Thread euromark
L values. So my question is how can I do that, and my second > question is why the default cake baking templates don't already do that. > > On Jan 24, 2011, at 04:53, euromark wrote: > > > > > > > > > you will need to create a custom template > > /t

Re: Select Box - Table or Tinyint?

2011-01-24 Thread euromark
you might wanna try: http://www.dereuromark.de/2010/06/24/static-enums-or-semihardcoded-attributes/ On 25 Jan., 00:11, cricket wrote: > On Mon, Jan 24, 2011 at 4:26 PM, Stephen > wrote: > > Hey there > > > I am designing a database layout for a project and it has quite a few drop > > down menu

Re: Allow empty selection for relationship id (NULL)

2011-01-24 Thread euromark
you will need to create a custom template /templates/custom/views/form.ctp and add your empty=>'' snippet for all "belongsTo" relations On 24 Jan., 02:45, Ryan Schmidt wrote: > Thanks, that works great, specifically: > >         echo $this->Form->input('some_id', array('empty' => '')); > > But

Re: See insert statements

2011-01-22 Thread euromark
you submit an empty string as id just omit the "id" key altogether and it will work On 23 Jan., 01:22, opike wrote: > Sorry, meant to type "debug($this->validationErrors)" > > and incidentally it is showing this now: > > Array > ( >     [Alert] => Array >         ( >             [id] => numeric >

Re: What are your personal conventions for Helper names and using helper classes?

2011-01-22 Thread euromark
; > So i hope Cake Devs intend to remove $html etc in 2.0, > > On Jan 21, 3:20 pm, euromark wrote: > > > > > > > > > of course 100% > > $this->Helper > > > a) cleaner > > b) fit for 2.0 > > > :) > > > On 21 Jan., 15:53,

Re: Hashed password displaying

2011-01-21 Thread euromark
thats not possible you simply let the user chose to submit a "new" password no need to display the old one (besides the fact that this is not possible and should not be) - its much safer anyway! On 22 Jan., 00:13, Andras Kende wrote: > I don't think a hashed password is reversible. > if you real

Re: Do I still need Model::$whitelist when using the Security component? --psybear

2011-01-21 Thread euromark
yes, that should be enough :) but what about ajax forms or dynamically added fields? those cannot be used with sec component in those cases you will have to manually secure your forms On 21 Jan., 12:57, psybear83 wrote: > Hey everybody > > to my knowledge, the $whitelist attribute tells a model

Re: What are your personal conventions for Helper names and using helper classes?

2011-01-21 Thread euromark
of course 100% $this->Helper a) cleaner b) fit for 2.0 :) On 21 Jan., 15:53, connrs wrote: > Hi guys > > I suppose this is my first ever post on any CakePHP related forum/group so > get the unicorns and badger porn out. I've been actively using CakePHP since > 1.1 and have generally beaten and

Re: Bake/inflector problem

2011-01-20 Thread euromark
"arrays in inflector.php - to no avail" well, thats because this is 1.2 style see the changes for 1.3 on how to do it in cake1.3 :) On 20 Jan., 22:33, Michael wrote: > Hello, > > I just ran into this problem as well, with a table named 'children'. > When making the view, it tried to create 'ch

Re: Recuperar datos de formulario con CakePHP

2011-01-20 Thread euromark
please try to post in english. On 20 Jan., 23:55, carlos pascual wrote: > Hola amigos, tengo una duda con CakePHP, ya que el manual me lia un > poco. > Es lo mismo poner: > >            $this->params["data"]["modelo"]["campo"] > > que poner estro otro: > >            $this->data["modelo"]["campo"

Re: How to display a BLOB object in VIEW

2011-01-20 Thread euromark
disagree with this one > point: > > On Jan 20, 2011, at 16:22, euromark wrote: > > > - a) 33% more space needed (base64encoded) > > There's no reason to store them base-64 encoded (or encoded in any way) in > the database; they're just stored as blobs -- bina

Re: How to display a BLOB object in VIEW

2011-01-20 Thread euromark
storing them in a database has the only advantage that they are stored with the data. not separately on the file system BUT - a) 33% more space needed (base64encoded) - b) a huge DB file to backup with all those binary data - c) working with them and displaying them is more difficult my approach

Re: Nothing works in IE

2011-01-19 Thread euromark
try ('Security.level', 'low') On 20 Jan., 03:36, "Dave Maharaj" wrote: > Every ajax request in IE logs me out. Every other browser is fine (FF, > Opera, Safari, Chrome) > > I have Configure::write('Security.level', 'medium'); > > Disabled Security component, even requests with simple jQuery reque

Re: help me

2011-01-19 Thread euromark
good one - didnt know that site before "to befuddle the victim’s brain while their soul is being removed through the abdominal cavity by way of a standard-issue Bendy Straw" AHHH Maybe we should sign him in at AV - Anonymous Vampires^^ A help group for such lost creatures On 19 Jan., 22:06, Hen

Re: help me

2011-01-19 Thread euromark
thats not how it works, bro^^ On 19 Jan., 20:11, InYan wrote: > I am a doctor from Russia. My hobby - cakephp. Please help learn > cakephp. Who are willing to help me - write to: skype: web-odissey, e- > mail: webodis...@gmail.com. Russian language skills are welcome. -- Our newest site for the

Re: Auth flash errors appearing in IE when not expected

2011-01-19 Thread euromark
my guess: browser cache problem put this in your beforeRender() in the app controller: if ($this->layout == 'default') { $this->disableCache(); } On 19 Jan., 17:58, chris wrote: > Still no clues on this. > > Tested further on 2 different computers, with IE8 and

Re: Can't get Form->select() with *no* empty value to work in 1.3 --psybear

2011-01-19 Thread euromark
doesnt matter for the outcome :) On 19 Jan., 17:04, Joshua Muheim wrote: > Thanks, but I should have said that I'm creating form elements *not* > for a model. > > > > > > > > On Wed, Jan 19, 2011 at 2:59 PM, euromark wrote: > > sry, i meant $this-

Re: UUID or INT and association problems

2011-01-19 Thread euromark
you might want to consider using char(36) instead On 19 Jan., 14:43, jjw wrote: > If I'm using the uuid as the id field, then I do something like this: > parents >     id                varchar(36) >     other fields > > children >     id                varchar(36) >     parent_id     varchar(36

Re: How to display a BLOB object in VIEW

2011-01-19 Thread euromark
put this in your app helper: /** * display image tag from blob content * enhancement for HtmlHelper * 2010-11-22 ms */ function imageFromBlob($text, $options = array()) { // $text = 'data:image/png;base64,' . base

Re: Can't get Form->select() with *no* empty value to work in 1.3 --psybear

2011-01-19 Thread euromark
sry, i meant $this->Form->input() ^^ On 19 Jan., 14:27, psybear83 wrote: > Hey everybody > > This is a very basic one, but I'm just not getting it, and it's > beginning to drive me nuts. > > According to this 1.3 guide (http://book.cakephp.org/view/1566/View- > and-Helpers), I sohuld use 'empty'

Re: Can't get Form->select() with *no* empty value to work in 1.3 --psybear

2011-01-19 Thread euromark
use Form->div('d', array('type'=>'select', 'options'=>$d)) On 19 Jan., 14:27, psybear83 wrote: > Hey everybody > > This is a very basic one, but I'm just not getting it, and it's > beginning to drive me nuts. > > According to this 1.3 guide (http://book.cakephp.org/view/1566/View- > and-Helpers)

Re: New Project: Politi

2011-01-18 Thread euromark
oh - and my question would be: who cares? i mean, will those politicians do something? or is it wasted time to contribute to this project or report any "problems"? sounds like this is going to be a "civil/private website". but thats already off topic :) On 18 Jan., 20:37, john lyles wrote: > We

CakePHP; Exceptions and Errors

2011-01-18 Thread euromark
Right now I would be happy if Cake used Exceptions I would like this snippet to work try { $result = Validation::custom($this->params['form']['value'], $this- >params['form']['validation']); } catch (Exception $e) { $message = $e->getmessage

Re: writing to SessionHelp inside the view

2011-01-17 Thread euromark
you got your logic all wrong then! all modifications to the session must (or "should" anyway) happen in the controller so, no. there is no reason to allow that. On 18 Jan., 00:44, zer0_gravity wrote: > Can you write/store a value in the session helper inside the view? so > that this value can b

Re: Plugins

2011-01-17 Thread euromark
i think you posted your component in the wrong thread, jeremy^^ On 17 Jan., 14:02, earth wrote: > Thanks Jeremy > Please provide the link here once you post it. > > On Jan 15, 8:17 pm, Jeremy Burns | Class Outfit > > > > > > > > wrote: > > I wrote an Authorize.net component a while back...I'll d

Re: Links

2011-01-17 Thread euromark
you probably looking for the text helper: http://book.cakephp.org/view/216/Text $linked_text = $text->autoLinkUrls($my_text); On 17 Jan., 14:07, Jeremy Burns | Class Outfit wrote: > There's one already in the > Bakery:http://bakery.cakephp.org/articles/gstoner/2008/03/12/authorize-net-a... > >

Re: App:import not working on hosting providers

2011-01-15 Thread euromark
you need to clear your cache then it will find it again :) On 15 Jan., 08:56, roman_coder wrote: > I'm working on Cakephp 1.3.6 and leveraging JonBradley's S3 plugin > (https://github.com/jonbradley/CakePHP-S3-Upload).  It works great on > my local dev box but once I put it on a hosting provider

Re: Cake source code optimization

2011-01-11 Thread euromark
e scheduled? > > Thanks, > Adrian > > On Tue, Jan 11, 2011 at 1:10 AM, euromark wrote: > > > > > > > > > thats what i remarked at the end :) > > i suppose it does > > > as for the other bottlenecks we will have to wait for 2.0 (and lazy >

Re: Cake source code optimization

2011-01-10 Thread euromark
thats what i remarked at the end :) i suppose it does as for the other bottlenecks we will have to wait for 2.0 (and lazy loading for all kinds of stuff) On 10 Jan., 17:05, Jon Bennett wrote: > > i would have liked that cake offered some kind of packed core (like CI > > - code igniter - does)

Re: Cake source code optimization

2011-01-10 Thread euromark
i would have liked that cake offered some kind of packed core (like CI - code igniter - does) all relevant core files that are required on every single request (30-40?) combined and minified directly included by the dispatcher or whatever although opcode cache should already minimize the include p

Re: php echo alternative/shorthand

2011-01-10 Thread euromark
you should read: http://stackoverflow.com/questions/200640/are-php-short-tags-acceptable-to-use On 10 Jan., 05:55, cricket wrote: > On Sun, Jan 9, 2011 at 9:56 PM, zer0_gravity wrote: > > Question I have noticed that the following statement works > > interchangeable. Is the equal sign '=' that s

Re: to Test or not to Test

2011-01-09 Thread euromark
u actually have something to show your > > > boss/client that it works the way they specified. > > > > Testing isn't a waste of time, *NOT* testing your application is a > > > waste of time. > > > > Nick > > > > On Jan 8, 8:01 am, netusco wrote:

Re: to Test or not to Test

2011-01-07 Thread euromark
you are partly wrong for small apps the amount of time needed for complete code coverage and full web test cases is far too much compared to the value. it would be wonderful, but we simply dont have the resources so test the stuff that is tested the quickest, test the stuff that can easily break

Re: Explain the empty function

2011-01-07 Thread euromark
http://php.net/manual/de/function.empty.php On 7 Jan., 19:56, zer0_gravity wrote: > I did this because I wanted to understand if the empty() is checking > for a null contained $this->data. > > On Jan 7, 12:57 pm, Miles J wrote: > > > > > > > > > Why are you attempting to do that? > > > !empty()

Re: How do you guys structure your shared components/behaviors/plugins repository (Subversion)? --psybear

2011-01-04 Thread euromark
yep, i use a "tools" plugin containing all those files one "svn:external" for all :) On 4 Jan., 13:24, Joshua Muheim wrote: > Short answer! I will look into it. Thanks. :-) > > > > > > > > On Tue, Jan 4, 2011 at 1:12 PM, AD7six wrote: > > > On Jan 4, 12:33 pm, psybear83 wrote: > >> Hey everybod

Re: is it possible to include the failed input string in the validation message?

2010-12-31 Thread euromark
thats already possible - you don't necessarily need the view for this app_model.php: /** * Overrides the Core invalidate function from the Model class * with the addition to use internationalization (I18n and L10n) * @param string $field Name of the table column

<    7   8   9   10   11   12   13   14   15   16   >