Re: error while running shell as cron

2011-11-04 Thread euromark
cake1.3 or 2.0? On 4 Nov., 13:35, abhimanyu bv wrote: > I am getting the following error when cron is running- 'PHP Fatal > error:  Class 'Shell' not found in /var/www/web/vendors/shells/ > deals.php on line 3'. > How to rectify this error? -- Our newest site for the community: CakePHP Video Tu

Re: Convert UTF-8 Problem , but i don't know how to do .

2011-11-04 Thread euromark
well, it should have been utf8 in the first place (even in 1.3 - it shouldnt even work with utf-8). maybe this is the problem? is it possible that the encoding is already messed up in the database? take a look at some utf8 content is the text scrambled or visible? that would be my guess. try runni

Re: Run a cron job in cakephp

2011-11-03 Thread euromark
you can use crontab to do that http://book.cakephp.org/view/1110/Running-Shells-as-cronjobs and here is explained how you can set the time accordingly: http://neeocis.wordpress.com/2008/07/08/crontab-every-five-minutes/ On 4 Nov., 03:21, Thiago Belem wrote: > Running a cronjob is something you

Re: Rudeness (was: Re: Making radio button labels clickable)

2011-11-03 Thread euromark
I guess the main problem with this list is the lack of "modern" post markup. With too much code as "plain text" it gets really hard to read and comprehend. I start to think that a google group is not the right board for code related issues. at least consider the possibility to post your issue at h

Re: Really Annoying Error

2011-11-03 Thread euromark
I have similar issues with the cache http://cakephp.lighthouseapp.com/projects/42648/tickets/2206-table-prefix-gets-lost-with-model-cache with the apc cache enabled it cant even find the tables and therefore dies with an internal server error. with the file cache there are still other problems occu

Re: CakepHP 2.0 plugins no longer cache in elements

2011-11-02 Thread euromark
do you mean that the cache is not working as in 1.3? did you read the migration guide? cache is now in the third param element('helpbox', array(), array('cache' => true)); ?> @see http://book.cakephp.org/2.0/en/views.html?highlight=elements#caching-elements or do you mean you cannot use nocache?

Re: Why specify the controller in the view?

2011-11-01 Thread euromark
ves vague code > >> that some poor soul needs to update years after the fact, with little > >> understanding of what's going on. > > >> I'll specify the exact controller. > > >> On Mon, Oct 31, 2011 at 3:41 PM, euromark > >> wrote: &g

Re: Why specify the controller in the view?

2011-10-31 Thread euromark
both will work exactly the same WITHIN the controller you may leave it out in this case. its always good practice to specify the controller, as well, though. but if you are outside of this controller you MUST specify it so better include it everywhere. especially if you move code around (copy and

Re: View with underscores is missing

2011-10-31 Thread euromark
did you try name your view file "ver_articulo"? On 31 Okt., 17:55, Mirdrack wrote: > Hi: > I have my project in local host and works ok but when i upload to my > server > linux x26_64 > apache 2.2.19 > php 5.2.1 > 5.0.92-community > > cakephp 2.0 send me the error of missing view but just in act

Re: any one else having trouble with table prefixes in 2.0?

2011-10-31 Thread euromark
non-functional now On 31 Okt., 14:37, euromark wrote: > if the model cache is renewed everything is fine > but as soon as cake uses the model cache the table prefix is lost and > causes sql errors > > the prefix is "site_" > > query with cached data from /tmp/ca

Re: CakePHP 2.0 Model relation alias, am I getting it wrong?

2011-10-31 Thread euromark
what happens if you use the official convention? CamelCase (not camelBack) 'className' => 'TestRelation' etc On 31 Okt., 13:52, John wrote: > Hey guys, I'm rather new in CakePHP although I've developed a couple > small projects back in the 1.1 era. > > I've been puzzled with the model relation a

any one else having trouble with table prefixes in 2.0?

2011-10-31 Thread euromark
if the model cache is renewed everything is fine but as soon as cake uses the model cache the table prefix is lost and causes sql errors the prefix is "site_" query with cached data from /tmp/cache/models: Error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cake.addresses' doesn't

Re: Question about login function (cakephp 2.0)

2011-10-30 Thread euromark
i wanted to post the link with hash: http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html?highlight=login#identifying-users-and-logging-them-in On 31 Okt., 00:51, euromark wrote: > http://book.cakephp.org/2.0/en/core-libraries/components/authenticati... > > On 30

Re: Question about login function (cakephp 2.0)

2011-10-30 Thread euromark
http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html?highlight=login On 30 Okt., 22:01, gloop wrote: > Hello everybody, > > i try cakephp 2.0 and the login sequence is very diffrent to cakephp > 1.3. > > In 1.3 its "magic" and you can type function login(){} > > In 2.0 i m

The new 2.0 Exceptions

2011-10-29 Thread euromark
One needs to get used to them, I guess. My current problem is that exceptions jump out of the current method if triggered. So in test cases for example not all tests get executed. This can be a good thing. But sometimes it would be better if it behaved like errors in 1.3 lets say we are testing a

Re: running tests from the command line

2011-10-28 Thread euromark
ake testsuite app AllController' (supposed you have a > test inside 'app/Test/Case/AllControllerTest'), or `cake testsuite app > Case/PostsController' (supposed you have > 'app/Test/Case/Controller/PostsControllerTest'). > > Cheers, > Matteo >

Re: Returning new value from private function

2011-10-28 Thread euromark
you probably mean "protected" in a framework environment there is no reason to use private classes or private variables. tip: look at 2.0 it does not have any private stuff (anymore). protected _myMethod() lg mark On 28 Okt., 07:23, Jeremy Burns | Class Outfit wrote: > Calling a private funct

running tests from the command line

2011-10-28 Thread euromark
how can one run tests from the command line? the core tests are listed with cake testsuite core so far so good but the app tests do not show especially tests in a plugin I cannot get to list or call cake testsuite app Tools.AllCakeTests does not work -- Our newest site for the community

Re: CakePHP 2.0 upgrade - benefit vs pain scale

2011-10-27 Thread euromark
using the current core UpgradeShell would be very painful indeed. I have hundreds of those files as well. Without my custom UpgradeShell I would have never ported it. I also submitted a lot of my improvements. Maybe they will find their way into the core shell. As soon as you have more than 20-40

Re: Problem with unbindModel

2011-10-27 Thread euromark
you can use the containable behavior its the fastest and cleanest approach On 27 Okt., 22:47, Tomfox Wiranata wrote: > Hi, > > I have two models: user and book. in my user model i defined this > object: > > 'HistoryAll' => >             array( >                 'className'              => 'Book'

Re: Own layouts and content-type

2011-10-27 Thread euromark
ng the same code except for the different content-type... a layout used to be the best solution so far: On 27 Okt., 11:43, euromark wrote: > this seems to be left undocumented > but cake2.0 seems to automatically output a content-type which > overrides the own one > > in 1

Own layouts and content-type

2011-10-27 Thread euromark
this seems to be left undocumented but cake2.0 seems to automatically output a content-type which overrides the own one in 1.3 I had in the "pdf" layout: header('Content-Type: application/pdf; charset=' . $charset); ... now in 2.0 it always is "text/html" after debugging I assume that the CakeRep

Re: Seeking clarification

2011-10-26 Thread euromark
I added the removal of those names in my UpgradeShell script with these patterns: $patterns = array( array( 'remove var $name = ...;', '/\bvar\s*\$name\s*=\s*(.*);/',

Re: Can Cake support sqllite for PHP4?

2011-10-25 Thread euromark
uation~~~ > > On 10月24日, 上午11时16分, euromark wrote: > > > > > > > > > may I ask why you will use a prehistoric PHP4 for a new website? > > this makes no sense at all - for me, anyway... > > usually you only develop on PHP4 (nowadays) if you have to maint

Re: pagination and canonical tag

2011-10-25 Thread euromark
g back to the index as long as all links are followed and all /view/ID links are correctly indexed. and it would make it way easier than my approach. thx. On 25 Okt., 10:11, AD7six wrote: > On Oct 24, 5:39 pm, euromark wrote: > > > > > > > > > > > this s

Re: Cake2.0 not recognizing my PHPUnit installation

2011-10-24 Thread euromark
I dont install it at all and just drop the necessary files in /vendors works like a charm :) On 24 Okt., 22:23, andrewperk wrote: > Hello, > > I have PHPUnit 3.5.15 installed on Linux, PHP 5.3.5, it was installed > using the pear installer per the directions in the cake 2.0 book. > > When I bro

pagination and canonical tag

2011-10-24 Thread euromark
this site states pretty clearly on how to use canonical http://www.johnfdoherty.com/do-bing-and-google-treat-relcanonical-differently/ " When should I definitely NOT use the canonical tag? A few times exist when you should not use the canonical tag, and instead use a different tactic: On paginate

Re: Can Cake support sqllite for PHP4?

2011-10-24 Thread euromark
may I ask why you will use a prehistoric PHP4 for a new website? this makes no sense at all - for me, anyway... usually you only develop on PHP4 (nowadays) if you have to maintain an already build app. but even then you should port it to PHP5 asap. please elaborate. mark On 24 Okt., 15:14, 玮成 叶

Re: Problem initialising i18n table using UUID in cake console

2011-10-24 Thread euromark
my guess: cake doesnt support uuids for those things on "initialize" but you could probably change the field manually to uuid afterwards then it should work again On 24 Okt., 09:59, André Fischer wrote: > I created a database that uses UUIDs exclusively for all id fields. > When I use cake i18n

Re: 2.0 view folders naming convention

2011-10-21 Thread euromark
I, too, have to grasp all the changes and understand WHY they are happening. and I am still not quite used to the idea of those CamelCase folder/ file names but I'll try not to pre-jugde anything here. It feels like the framework did make a huge step in the right direction no matter what the files

Re: Modify default “baked” templates in 2.0

2011-10-21 Thread euromark
i wonder why Templates is uppercase? there is no namespace here, is there? or no actual classes in this template folder... On 21 Okt., 18:25, José Lorenzo wrote: > app/Console/Templates/* -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new Ca

Re: CakePHP 2.0 Component Calling Helper

2011-10-21 Thread euromark
looks kind of ugly one more reason to get those functions out of the helpers into libs there is no reason for almost 70% of all helper functions to be in helpers some might have to be used in controllers etc. therefore they should be libs and the helpers should internally use those libs. it starts

Re: Not persisting a single field of the Model

2011-10-20 Thread euromark
unsetting them is not even necessary if those input names do not exist in the table simply validate against them as other inputs via $validate array in the model - nothing else has to be done. and you SHOULD do this in the model - not the controller. as for password confirmations you can use behav

migrating components to 2.0

2011-10-20 Thread euromark
the migration guide states the new params of components class PrgComponent extends Component { function __construct(ComponentCollection $collection, $settings = array()) { parent::__construct($collection, $settings); } } but if you have old components you used in shells, etc you g

Re: Table design for storing of synonyms

2011-10-20 Thread euromark
"read performance is very important" in this case i would go for both a) group them via group_id (to modify or find by group) b) use a word as key (mysql index key) c use my jsonable behavior to store all synonyms to this word in the same row (0..infinite) http://www.dereuromark.de/2011/07/05/int

Re: Send SMS in Bulk

2011-10-20 Thread euromark
you can combine a queue plugin with a sms lib for instance: https://github.com/MSeven/cakephp_queue On 20 Okt., 12:36, andy_the ultimate baker wrote: > Hello friends > > I have one project where i need to send sms in bulk i.e 1000 sms in > single instance. > > Can anybody provide me any referen

Re: Console Bake plugin

2011-10-19 Thread euromark
he sure is...^^ @björn would you be so kind to provide some actual code you tried to enter into your console? plus the result of your communication with the bake shell - it must have answered you somehow. thank you so much and please don't expect us to be magic consoles. most of us still cannot r

Re: CakePHP 2.0 Released

2011-10-19 Thread euromark
ok, wasnt the OS but the way i called the upgrade shell. anyway - I opened a ticket regarding some enhancements/bugs -- 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 Ca

Re: 2.0 upgrade shell

2011-10-19 Thread euromark
i just wrote down a list of bugs and enhancements I found the last couple of hours trying to port a medium to large sized app http://cakephp.lighthouseapp.com/projects/42648-cakephp/tickets/2117-improvements-for-20-upgrade-shell On 19 Okt., 13:32, majna wrote: > When upgrading plugins for each

Re: redirects or exceptions?

2011-10-19 Thread euromark
onally did redirects with 404 status on one project, but never > thought is it valid from HTTP perspective or not. Hope that > customization of NotFoundException allows to do anything - as 404 page > output as custom redirect. > > On 18 ÏËÔ, 18:29, euromark wrote: > > >

Re: 2.0 upgrade shell

2011-10-18 Thread euromark
already in order to run this shell script? On 19 Okt., 01:30, euromark wrote: > i have another question > > after running > E:\...\trunk2\lib\Cake\Console>cake -app E:\...\trunk2\site upgrade > all > why does the shell delete itself? > > Console/AppShell.php > Cons

Re: CakePHP 2.0 Released

2011-10-18 Thread euromark
damn - you guys really don't like windows ;) seems like you got a self destruction mode built in for this operating system. just tried to upgrade one of my apps with the "upgrade shell". maybe I better use a virtual machine and linux^^ @see http://groups.google.com/group/cake-php/browse_thread/thr

Re: 2.0 upgrade shell

2011-10-18 Thread euromark
i have another question after running E:\...\trunk2\lib\Cake\Console>cake -app E:\...\trunk2\site upgrade all why does the shell delete itself? Console/AppShell.php Console/Shell.php are missing after that operation! very strange and it also only fixed __() and other minor stuff seems like no re

Re: CakePHP 2.0 features

2011-10-18 Thread euromark
as AD said $this->Helper prevents conflicts that happened quite often with <=cake1.2 you can always put your custom method in your AppHelper or enhance the HtmlHelper like so: function imageLink($img, $url, $options) {} $img should be the final img tag from $this->Html->image() array('escape' =

redirects or exceptions?

2011-10-18 Thread euromark
the last years with cake <= 1.3 everybody simply redirected if a record didnt exist if (!$post) { //flash message (error) $this->redirect(...) // to previous url or default index etc } the 2.0 book proposes: if (!$post) { throw new NotFoundException(); } so are redirects "outdat

Re: Detect a route prefix in a given url

2011-10-17 Thread euromark
if its just the admin prefix (and none others available) you can just check on it via strpos() because it will be at the beginning of each relative url. if not there, its not an admin link but tilens approach is more generic On 17 Okt., 20:17, Tilen Majerle wrote: > you can use Router::parse($s

Re: Limit output from DB based on user_id

2011-10-17 Thread euromark
@see Display only the user’s own posts http://www.dereuromark.de/2011/10/05/common-cakephp-problems-and-solutions/ or what do you mean? just make sure you include the user_id condition in all your find queries On 17 Okt., 20:56, MetZ wrote: > Hi. > > I am wondering how I can go about to limit/l

Re: Replace user_id to username

2011-10-17 Thread euromark
that is working, cake automatically gets the corresponding user > > data when you use find(). > > Now you can pass the results to the view and get the username with > > $post['User']['username']. > > > -flosky > > > On 17 Okt., 11:03

Re: Layouts

2011-10-17 Thread euromark
sounds like a component would be helpful here it can store the current layout in the session but also automatically set the layout depending on some conditions etc On 17 Okt., 06:39, Nitin Hittalamani wrote: > Yup...You need to mention if you are using other lay out instead of default. > This is

Re: Replace user_id to username

2011-10-17 Thread euromark
did you add $this->displayField = 'username'; to the user model? On 17 Okt., 02:58, Mitchell Vargo wrote: > Is there an easy way of replacing the user_id to username in a view > that looks like this? > > >         >         >         >         >                 >                 >        

Re: how can I validate this field?

2011-10-14 Thread euromark
there is a reason why I strongly voted in favor of changing the default value for last from false to true...^^ "Always use “last”=>true for your rules. Unfortunately, the default value is still false here. “true” makes sure that after the first rule already returned false, the following ones are n

Re: radiobutton problem

2011-10-14 Thread euromark
@paul that's what I just asked myself, as well :) On 14 Okt., 09:02, WebbedIT wrote: > I think the problem is 'label'=>true as the label parameter allows you > to override the default label, it expects a string, not a true/false. > > How would values of 'on' or 'off' be valid for a user_id field

Re: performance / traffic / .. -> one READ or few FIND calls?

2011-10-12 Thread euromark
a) you never need read() - i dont use read() once for over 3000 actions. i favor always the find() due to its advantages like contain and fields you just need to remember to always pass along the id (which would read do automatically) b) updateAll() is atomic and does exactly want you want. On 1

Re: Form dropdown multiple selected array not working

2011-10-11 Thread euromark
why not 'options' => $categories ? since $categories probably is an array and contains the keys On 10 Okt., 21:38, MetZ wrote: > Hi all. > > I am having trouble setting the selected to the options when selected > is an array. > > (This is a edit content view) > Dropdown display all categories (

Re: How do you track your issues / bugs ?

2011-10-11 Thread euromark
> http://www.classoutfit.com > > On 10 Oct 2011, at 22:46, euromark wrote: > > > > > > > > > i am keen to check it out once its stable > > > yes - email and docs are not suitable for issue tracking, of course. > > > but i can tell you - i wouldnt crea

Re: Approve data changes

2011-10-11 Thread euromark
i think there is a "revision behavior" that does sth like that out here the new version of http://bakery.cakephp.org/articles/alkemann/2008/12/18/revision-behavior-revision-control-made-easy somewhere at github On 11 Okt., 09:28, Matteo Landi wrote: > I suggest you to store different versions o

Re: How do you track your issues / bugs ?

2011-10-10 Thread euromark
i am keen to check it out once its stable yes - email and docs are not suitable for issue tracking, of course. but i can tell you - i wouldnt create my own issue tracker if not absolute necessary there are already enough "bugs" in your current software you are working on. why spending all your ti

Re: General question about default.ctp and its controller

2011-10-10 Thread euromark
in beforeRender() in your app controller also make sure $this->MathCaptcha is available! On 10 Okt., 17:54, "flo.kl...@googlemail.com" wrote: > If i understand correctly you want to set the variable so it is available to > any view. > You can put your code in the AppController.php to achieve

Re: flash message when validate in model doesn't work

2011-10-10 Thread euromark
so what exactly do you want from us?^^ On 10 Okt., 14:53, taqman filler wrote: > but flash message in auth or other action is work > > thankyou -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org

Re: checking if Save() method was successful...

2011-10-09 Thread euromark
i cant follow you wants your problem? if ($result) {} works as expected in your case NOT EMPTY ARRAY equals FALSE therefore you already have a valid check if the saving succeeded On 9 Okt., 11:48, Tomfox Wiranata wrote: > hello andrewperk, > > thanks for your help. i appreciate that. one que

Re: Best practice for pending/approved flag for comments in a blog

2011-10-06 Thread euromark
it seems a simply boolean (tinyint 1) is enough in your case On 6 Okt., 15:14, Zaky Katalan-Ezra wrote: > You can review CakeDC comments pluginhttps://github.com/CakeDC/comments > > > > > > > > On Wed, Oct 5, 2011 at 11:02 AM, Boyan wrote: > > Hello, > > > I am trying to develop a blog- like ap

Re: Partial date validation / Model::deconstruct() thoughts

2011-10-05 Thread euromark
you can easily write your own custom validation rules for dates i did so myself for the "start and end dates" as well as problems with empty strings just place them in your app model in order to make them available in every model. On 5 Okt., 19:37, "gregor.morr...@gmail.com" wrote: > I've been

Re: Core validation rules examples

2011-10-05 Thread euromark
good luck the ticket system seems to be down for several hours now.. probably a server failure maybe tomorrow it will be online again On 5 Okt., 13:37, Jonathan wrote: > On Oct 5, 12:08 pm, euromark wrote: > > > either way notEmpty should work fine with the current 1.3 versions &

Re: Core validation rules examples

2011-10-05 Thread euromark
: > On Oct 4, 5:10 pm, euromark wrote: > > > to make sure you should use a fullvalidationarray > > Is that documented anywhere? - Because then the cook book should be > corrected. Otherwise I'm still not sure if the bug is in the book or > in the code... > >

Re: Core validation rules examples

2011-10-04 Thread euromark
to make sure you should use a full validation array var $validate = array( 'title' => array( 'myNotEmptyRule' => array( 'rule' => 'notEmpty', ... On 4 Okt., 16:53, Jonathan wrote: > On Oct 4, 11:49 am, Jens Dittrich wrote: > > > Have you checked the bug reports or fix

Re: Force Trailing Slash and No WWW

2011-10-04 Thread euromark
you should know that it should be the other way around! none => www http://domain => http://www.domain thats just how everyone does it... some conventions make sense to stick to but thats thats just my 5 cents On 3 Okt., 22:41, Ryan Schmidt wrote: > On Oct 3, 2011, at 15:21, creat1v1ty wrote:

Re: Replacing tabs with spaces, finding the user view

2011-10-03 Thread euromark
i wrote sth quite some time ago about custom templates: http://www.dereuromark.de/2010/06/22/cake-bake-custom-templates/ there you will find the places and the file names to put there the official documentation is not that bad either (and not hard to find with the right keywords): http://book.cak

Re: Replacing tabs with spaces, finding the user view

2011-10-03 Thread euromark
1) dont use spaces in the first place your whole app should have tabs as indentation - spaces are a bad practice but if your company is not able to use the more appropriate indentation you will need to customize all bake templates for your need: /vendors/shells/templates/ 2) yes, sure either use b

Re: Unable to use CakePHP bakery...

2011-10-03 Thread euromark
you should hit ENTER to confirm that you want to use default config or enter a different string i find the description text pretty clear on that one. On 3 Okt., 16:06, "Yves S. Garret" wrote: > Ok, I'm going through the steps of the rest of the tutorial: > > http://book.cakephp.org/view/1544/Prep

Re: history log table

2011-10-03 Thread euromark
you could write a method in the model or even a behavior which will do that for you in the beforeSave() callback it can be triggered globally On 3 Okt., 06:38, elogic wrote: > My client wants a listing of all actions that happen within the system > so they can check back and search the records a

Re: Make link disabled

2011-10-02 Thread euromark
or use 'javascript:void(0)' as link On 1 Okt., 22:09, Ryan Schmidt wrote: > On Oct 1, 2011, at 13:47, Dominik Gajewski wrote: > > > How to make in Cake link disabled?? > > Html->link('name',      array('controller' => 'bookings', > > 'action' => 'book'), > >                                      

Re: Problem in plugin url

2011-10-01 Thread euromark
isnt your question similar to http://groups.google.com/group/cake-php/browse_thread/thread/a9d870814d9b5472# ? then you might find your answer there On 1 Okt., 07:27, taqman filler wrote: > when I click link  page come from plugin > all link in page is transform to > > http://127.0.0.1/cakeplate

Re: Pagination and delete an item in a paginated list with jquery

2011-09-29 Thread euromark
you can update the complete content of the content div this way everything is current then again On 29 Sep., 12:23, heohni wrote: > Hi, > > I have a paginated list and want to remove single items out of it with > jquery. > Is there any way I can update the pagination info for the paginator as >

Re: Problem displaying output to view when using loadModel()

2011-09-28 Thread euromark
if you dont submit the id how can read() ever return the correct/ expected result? thats what I ask myself when I look at your code On 28 Sep., 17:08, dave wrote: > Hi > > A newb having problems I'm afraid... > > I have a controller as follows: > > class NdasController extends AppController { >

Re: Html helper - stop adding prefix unless explicitly specified

2011-09-28 Thread euromark
i use a custom app helper method i called defaultLink() which resets all prefixes unless specified. although thats maybe not exactly what you have in mind but you could make sth similar with your own default values either way - called via $this->Html->defaultLink(); in any view as always On 28

Re: Can't get the required class in form

2011-09-27 Thread euromark
usually required is also added if your DB field is default NOT NULL if it is DEFAULT NULL it should have no required class On 27 Sep., 09:28, WebbedIT wrote: > You have overwritten the div with the 'div'=>'row' attribute. > > HTH, Paul. > > On Sep 26, 4:54 pm, heohni > wrote: > > > > > > > > >

Re: Data Not Saving Saving to db

2011-09-27 Thread euromark
also pr() the $this->Modelname->validationErrors: pr($this->Modelname->validationErrors); On 27 Sep., 12:01, Teddy Zeenny wrote: > To easily identify the error, you can echo pr($this->data) in the add > action. > Could it be that the attributes should be lower case ? i.e. > $this->Form->input('

best open source development software 2011

2011-09-23 Thread euromark
the German magazine "computerwoche" (computer week) just announced cakephp the best "Best of Open Source 2011" this year: http://www.computerwoche.de/software/software-infrastruktur/2495763/index2.html quick google translation: "Among the PHP web framework CakePHP offered according to Infoworld, t

Re: mixing uuid and aiid

2011-09-23 Thread euromark
after many many hours i finally found it... one shouldnt override basic model functions like getId() in the current model. breaks a lot of things :) On 21 Sep., 13:05, euromark wrote: > i never had a problem mixing auto increment ids and uuids. > but with the current head versions of cake

mixing uuid and aiid

2011-09-21 Thread euromark
i never had a problem mixing auto increment ids and uuids. but with the current head versions of cake1.3 it seems to get messed up i got a simple address table with id(int 10) as primary and a foreign_id (char 36) for user model etc pretty sure it used to work but now on every update it tries to

Re: Form->radio with zero value

2011-09-20 Thread euromark
i find it awkward to mix those values, as well. you can use integer values as keys and replace them later on with text. or use strings from the beginning. On 20 Sep., 01:34, "gregor.morr...@gmail.com" wrote: > I'm running into a weird situation where I have three CakePHP- > generated radio butto

Re: Editing data

2011-09-14 Thread euromark
a less abstract code example would help you code post your "real" code. maybe this way we can figure out whats wrong with your code. On 14 Sep., 05:35, nOLL wrote: > Hi, > > I have a form that use 2 models(A,B). For create and view function it > was run perfectly, but there is a problem when edi

Re: baker to commit to svn

2011-09-12 Thread euromark
i cannot follow... On 12 Sep., 21:05, hr_software_developer wrote: > What's the best place to make changes so that whenever I made classes > through baker it can submit to svn? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questi

Re: pass information to the view

2011-09-11 Thread euromark
@zaky you meant.. $this->set(compact('campos')); @aortizhi you can then access it with $campos['Model']['field'] On 11 Sep., 19:21, Zaky Katalan-Ezra wrote: > $this->set('campos',$campos); > or > $this->set(compact($campos)); > > > > > > > > On Sun, Sep 11, 2011 at 7:28 PM, aortizhi wrote: >

Re: Why is this better?

2011-09-11 Thread euromark
"But using php to generate link is slower to render a page" actually its not notically at all - even under heavy load. the important fact is how MANY links there are on a single page. this will decide the page load. so as long as you dont need to output > 1000 links you will be fine. On 11 Sep.,

Re: Email component working wrong

2011-09-11 Thread euromark
are you sure that the "username" is actually an email address? or did you wanna write $User['User']['email'] ? On 9 Sep., 16:48, Piotr Chabros wrote: > Hello, > > I have a function sending email to all the users, and every email sent > is copied to another email address too: > > [CODE HERE] > $th

Re: How To Restrict Logged In Users To Only Their Profile

2011-09-03 Thread euromark
basically (careful: get/postredirect etc are my own methods): function edit() { $uid = $this->Session->read('Auth.User.id'); if (!empty($this->data)) { $this->data['User']['id'] = $uid; if ($this->User->save($t

Re: How to retrieve data which is posted to secure page

2011-09-02 Thread euromark
you should as a guideline always post a form to itself. therefore the same action can work with the posted data and afterwards redirect to the secure page On 1 Sep., 22:27, vinay wrote: > Hi, > Looking for help on implementing requirement where user will see a > form even without logging in to t

Re: Login check

2011-08-27 Thread euromark
a) you should use beforeRender() to pass stuff to the view b) why so complicated? you do have the session helper in the view if ($this->Session->check('Auth.User.id')) {} but your approach would work, too :) On 27 Aug., 09:20, Prabha vathi wrote: > function beforeFilter(){ > > $this->set('log

Re: HTML ENTITIES

2011-08-26 Thread euromark
depends on the situation but in 99% of all cases: dont sanitize, dont strip tags, dont do anything on save simple use h() to remove html tags in the view where you output the database content echo h($user['User']['username']); etc On 26 Aug., 23:47, Ryan Schmidt wrote: > On Aug 26, 2011, at 15

Re: odd problem for reading session

2011-08-24 Thread euromark
either way you should omit the trailing ?> anyway - in all php files On 24 Aug., 17:34, Teddy Zeenny wrote: > Are there any spaces or new line characters after the " ?> "  ? > > > > > > > > On Wed, Aug 24, 2011 at 6:22 PM, pang wrote: > > Hi, > > > I met a very odd problem, I create a new contr

Re: multiple controller in one model

2011-08-24 Thread euromark
maybe its just me - but i really can't follow you. after reading it three times :) also the headline does not seem to make sense to me.. please clarify (with live example code etc) On 24 Aug., 11:18, nOLL wrote: > Hi, > > Is it possible to add in attributes from multiple controller into one >

Re: Subquery or something else?

2011-08-23 Thread euromark
although this will get quite slow with more and more ids and might consume a lot of memory some day depending on the size a subquery might some day be more suitable. but until then this 2-query will work fine. On 23 Aug., 13:44, Dwayne Hanekamp wrote: > That worked, awesome! > > Thanks so much J

Re: $this->Form->create doesn't work as stated

2011-08-23 Thread euromark
+1 for webbedIts answer :) On 23 Aug., 11:08, WebbedIT wrote: > I have never tried to use Cake without URL Rewriting so can;t give you > an answer as to whether it's possible or advisable. > > I would personally think you're creating a big headache for yourself > if you're trying to use Cake on a

Re: Login security

2011-08-21 Thread euromark
@sam not a good idea users could then block accounts of other users a simple "deadlock" for a few minutes is more than enough to keep out bot attacks or bruteforce important is that this is done via DB (not session or anything) On 21 Aug., 17:46, Sam Sherlock wrote: > All of 30 earth minutes? >

Re: save and update

2011-08-19 Thread euromark
he probably means "injection" attacks the security component itself will NOT help here - as some might think. it only ensures that the inputs stay the same, they are not covering the content of them. @see http://www.dereuromark.de/2010/09/21/saving-model-data-and-security/ for solutions On 19 Aug

Re: No CSS styling in Cake setup - tried everything

2011-08-16 Thread euromark
you should - if you have access - always use the full document root (down to webroot) /Users/koreill1/Sites/cake/app/webroot/ then your file is accessable with http://localhost/css/cake.generic.css and everything should work i recommend using virtual host domains for your different projects: htt

Re: development best practices

2011-08-16 Thread euromark
I use a plugin "tools" where I have my "own" AppController, .. etc as Libs: /libs/my_app_controller.php MyAppController extends Controller {} now I can use in all projects: AppController extends MyAppController {} same for all other classes On 16 Aug., 09:36, luca capra wrote: > Hi, > I've st

Re: Setting default value with a query

2011-08-16 Thread euromark
here you will find what you are looking for http://www.dereuromark.de/2010/06/23/working-with-forms/ careful with custom SQL queries, though. the result will not be formatted the way normal query results (with find() etc) are. use pr() to find out how your result array looks like and then populate

Re: How to specify a count(id) field for find method

2011-08-15 Thread euromark
,'MIN(Product.price) as > price'), 'group' => 'Product.type'); > > Jeremy Burns > Class Outfit > > http://www.classoutfit.com > > On 14 Aug 2011, at 22:54, Roland Pish wrote: > > > > > > > > > Thanks for your reply euro

<    4   5   6   7   8   9   10   11   12   13   >