Re: class AppHelper not found

2014-06-21 Thread Joshua Dorenkamp
I know this is a little old, but thought I'd post my solution to a similar problem here. I was getting the same error and when I checked my server logs I found that there was a syntax error in my AppHelper file. ( I had a semicolon after a function definition public function fs( $var =

Problem with controllers

2013-09-10 Thread Joshua Song
Hey guys, I'm rather new to Cakephp, but I made a website using cakephp and bootstrap churchsupport.org Anyways, I when I made this on the localhost, everything worked fine. But for some reason after I moved the site to a web host, one of the controllers (the about us controller) seems to be

Help with controller

2013-09-10 Thread Joshua Song
Hey Guys, I'm new to cakephp, but I made a website using both cakephp and bootstrap. When I made the website on localhost, it was perfectly fine. But for some reason when I moved it to my web host, one of the pages wouldn't load due to a missing controller error. But the controller file was

Re: Webtesting using SimpleTest: How to reset database?

2011-02-24 Thread Joshua Muheim
/wordpress/?p=71 I hope somebody else will find this useful. :-) Please leave a message if you try it... I'm happy to optimize it further. On Mon, Sep 6, 2010 at 2:30 PM, Joshua Muheim psybea...@gmail.com wrote: Thank you, but this looks like an article that only tells how to use fixtures with unit

Re: Connect to test-DB when running web tests?

2011-02-24 Thread Joshua Muheim
I managed to work out a solution for this, and I released it as a library so everyone can use it. I've written in my blog about it. - Why web tests using the development database are a bad thing: http://josh.ch/wordpress/?p=8 - Finally: use fixtures with your CakePHP web tests!:

Re: hasMany: check for depending objects when deleting and deny?

2011-02-24 Thread Joshua Muheim
, Oct 19, 2010 at 4:15 PM, Joshua Muheim psybea...@gmail.com wrote: So it seems there's no such functionality yet? I will try to create a component or something for this... On Thu, Sep 16, 2010 at 12:17 PM, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: Go directly to the source

Re: Web tests using fixtures: Finally got them working!

2011-02-24 Thread Joshua Muheim
somebody else will find this useful. :-) Please leave a message if you try it... I'm happy to optimize it further. On Thu, Oct 14, 2010 at 11:28 AM, Joshua Muheim psybea...@gmail.com wrote: OK, I slightly updated the post and corrected the download link. Please, give it a try! :-) On Thu, Oct

Re: So IS there a way to use fixtures with web tests or NOT???

2011-02-24 Thread Joshua Muheim
leave a message if you try it... I'm happy to optimize it further. On Fri, Sep 17, 2010 at 11:52 AM, Joshua Muheim psybea...@gmail.com wrote: Your link looks very interesting. I will take a look at it. Thanks! On Thu, Sep 16, 2010 at 10:10 PM, euromark dereurom...@googlemail.com wrote

Re: Is there an easy way to tell CakePHP to use another db setting instead of $default?

2011-02-24 Thread Joshua Muheim
. :-) Please leave a message if you try it... I'm happy to optimize it further. On Mon, Oct 18, 2010 at 9:43 AM, Joshua Muheim psybea...@gmail.com wrote: Thanks, guys! I will take a look at these links. On Fri, Oct 15, 2010 at 1:28 PM, euromark dereurom...@googlemail.com wrote: this is nothing

Re: Easiest way to get data from a model (better way than $model-data['modelname']['field'])?

2011-02-24 Thread Joshua Muheim
Just in case somebody is interested... I have added a small method data() that works a little nicer in my opinion than the standard way of accessing the data array's values is... So instead of $this-Model-data['User']['name'] you can just call $this-Model-data('name')... saves you a few

Re: Is there a standard way of making sure that foreign keys exist?

2011-02-24 Thread Joshua Muheim
I have added this behavior to my Subversion repository and created a small blog article about it... I hope someone finds this useful. Automatically prevent records with depending children from being deleted: http://josh.ch/wordpress/?p=80 On Fri, Nov 5, 2010 at 9:46 AM, Joshua Muheim psybea

Re: Is there a standard way of making sure that foreign keys exist?

2011-02-24 Thread Joshua Muheim
Oops, my bad, wrong behavior (although the mentioned one is quite useful, too). Here's the correct one: Automatically verify foreign keys in CakePHP: http://josh.ch/wordpress/?p=63 On Thu, Feb 24, 2011 at 5:33 PM, Joshua Muheim psybea...@gmail.com wrote: I have added this behavior to my

Re: Have my own Controller::var variable that is not overridden by descending AnotherController::var (but merged)? --psybear

2011-02-24 Thread Joshua Muheim
, Dec 2, 2010 at 12:47 PM, Joshua Muheim psybea...@gmail.com wrote: Thanks for pointing me into the right direction! :-) On Thu, Dec 2, 2010 at 11:56 AM, Amit Badkas amit.sanis...@gmail.com wrote: Hi, Controller does merging of 'uses', 'helpers' and 'components' only by default, please have a look

Re: DEBUG=2: My error500 shows; DEBUG=0: I get not found. --psybear

2011-02-24 Thread Joshua Muheim
different to the default 404 when an error happens, you should call $this-render('some_error') or something like that. On Wed, Jan 26, 2011 at 9:44 AM, Joshua Muheim psybea...@gmail.com wrote: Thanks for your reply, Steve. I have created app/app_controller.php with the following content: ?php class

Re: SecondController extends FirstController extends AppController: not supported? --psybear

2011-02-02 Thread Joshua Muheim
Thanks for your thoughts and explanations, AD. On Wed, Feb 2, 2011 at 10:02 AM, AD7six andydawso...@gmail.com wrote: I think you're the first person to notice it and not think oh, 2 secs of editing and I can work on the next part of my problem. I guess you're right, I would have saved a lot of

Re: SecondController extends FirstController extends AppController: not supported? --psybear

2011-02-02 Thread Joshua Muheim
However, I do think you should pick some of your words a little bit more carefully, you are talking as if PHP is a lesser language and restrictive In fact - I do, yes. ;-) But Ruby has adopted quite some patterns and features of PHP, so PHP isn't all bad. ;-) (Don't take me too serious,

Re: SecondController extends FirstController extends AppController: not supported? --psybear

2011-02-01 Thread Joshua Muheim
Thanks, guys (especially to Tilen for his constructive feedback on my posting habits ;-) ). It seems to me I often run into limitations of CakePHP that I hope I can't be the only one who faced them yet and that there's a well known work-around already. In fact, I often seem to be the only person

Thanks for your support

2011-02-01 Thread Joshua Muheim
Thanks for your support, Ryan. It's a relief to hear I'm not the only one facing these unexpected challenges with CakePHP. Let's see whether this discussion gives some enlightment... :-) -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new

Re: Select Box - Table or Tinyint?

2011-02-01 Thread Joshua Muheim
Off-topic, but maybe important once in a while: you should provide disjunctive options in a selectbox: 15'000 - 24'999 25'000 - 34'999 etc. More user friendly could be: 25'000 35'000 ...or something like that. :-) On Tue, Feb 1, 2011 at 5:19 PM, LipeDjow liped...@gmail.com wrote: The same

Re: Select Box - Table or Tinyint?

2011-02-01 Thread Joshua Muheim
Maybe this is even better: Up to 25'000 Up to 35'000 ... :-) On Tue, Feb 1, 2011 at 5:37 PM, Joshua Muheim psybea...@gmail.com wrote: Off-topic, but maybe important once in a while: you should provide disjunctive options in a selectbox: 15'000 - 24'999 25'000 - 34'999 etc. More user

Re: SecondController extends FirstController extends AppController: not supported? --psybear

2011-02-01 Thread Joshua Muheim
Thanks Jamie for your interesting thoughts. On Tue, Feb 1, 2011 at 8:05 PM, Jamie jamie@gmail.com wrote: And since extending controllers beyond the AppController relationship isn't really in the docs and not the official way to do things, there probably hasn't been much impetus to change

Re: Error NewBe

2011-01-31 Thread Joshua Muheim
You should check first whether your $someone array has a key User before trying to access it: http://php.net/manual/en/function.isset.php This is a PHP issue, not a CakePHP one. :-) On Mon, Jan 31, 2011 at 9:07 AM, sadeepap sadeepa.palliyag...@gmail.com wrote: Hi , I am a new comer to Cake

Re: Translating the scaffold flashes - it nearly can't be done the way they are formatted?! --psybear

2011-01-28 Thread Joshua Muheim
Should it? I guess this only works specifically for me and my german-needs, and wouldn't be of any sense for the whole project? On Fri, Jan 28, 2011 at 10:50 AM, AD7six andydawso...@gmail.com wrote: On Jan 27, 1:24 pm, Joshua Muheim psybea...@gmail.com wrote: Thank you, Ryan. I know

Re: Is there a way to make all view context available in a helper's method? --psybear

2011-01-28 Thread Joshua Muheim
Oooops, my bad! Just found it out myself... Why didn't I see this before? I definitely thought about it and tried it out... must have made a slip... I'm sorry. :-) On Fri, Jan 28, 2011 at 2:32 PM, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: Check for $this-params in the

Re: Is there a way to make all view context available in a helper's method? --psybear

2011-01-28 Thread Joshua Muheim
Oh, but another question: I'd like to make use of the elements() method within my helper. This doesn't seem to be possible...? On Fri, Jan 28, 2011 at 2:50 PM, Joshua Muheim psybea...@gmail.com wrote: Oooops, my bad! Just found it out myself... Why didn't I see this before? I definitely thought

Re: Translating the scaffold flashes - it nearly can't be done the way they are formatted?! --psybear

2011-01-28 Thread Joshua Muheim
...@gmail.com wrote: On Jan 28, 11:01 am, Joshua Muheim psybea...@gmail.com wrote: Should it? I guess this only works specifically for me and my german-needs, and wouldn't be of any sense for the whole project? You see no point in submitting patches which correct   __(sprintf( to translatable

Re: Is there a way to make all view context available in a helper's method? --psybear

2011-01-28 Thread Joshua Muheim
I think I don't really understand your answer. :-) In views I can use $this-element(...), and I'd like to call this function in a helper's method... at the time being, I pass $this to the method: // View echo $this-MyHelper-element($paras..., $this); // Helper function element($params...,

Re: How can i hide the cakephp .ctp extension

2011-01-27 Thread Joshua Muheim
Hey Narendra I guess you are very new to CakePHP? .ctp extensions are never shown to the end user, they are only used by CakePHP internally. I guess you should take a look at the CakePHP book first... http://book.cakephp.org/view/1078/Views Have fun! On Thu, Jan 27, 2011 at 10:32 AM, Narendra

Re: Translating the scaffold flashes - it nearly can't be done the way they are formatted?! --psybear

2011-01-27 Thread Joshua Muheim
Thank you, Ryan. I know the problem of the 3 different the in german. I'm from Switzerland... ;-) Anyway, there are some workarounds you can take... e.g. instead of using Der/die/das Buch wurde gespeichert. you can simply use Buch wurde gespeichert.. Not that very nice, but all correct. But

Re: DEBUG=2: My error500 shows; DEBUG=0: I get not found. --psybear

2011-01-26 Thread Joshua Muheim
Thanks for your reply, Steve. I have created app/app_controller.php with the following content: ?php class AppError extends ErrorHandler { function error500($params) { header('HTTP/1.1 500 Internal Server Error'); $this-_outputMessage('error500'); } } ? But it still doesn't work,

Re: $this-Form-select(...) creates HTML tag with ID, but with empty name! --psybear

2011-01-24 Thread Joshua Muheim
Thanks for testing it, Andy! I used CakePHP 1.3.6, and now I upgraded to CakePHP 1.3.7 - and now it works again! But on friday it also worked on the old version, and I can't remember any significant change that could have stopped it from working! Hell - strange...! Anyway, it's working again.

Re: Small question about L10n: Configure::write('Config.language', 'de'); doesn't seem to do anything? --psybear

2011-01-24 Thread Joshua Muheim
Oh, and it seems uses('L10n'); is also not needed? On Mon, Jan 24, 2011 at 12:06 PM, psybear83 psybea...@gmail.com wrote: Hey everybody I'm currently doing l10n for my web. I have browsed through some articles, and their alltogehter-verdict was: - Put uses('L10n'); into your AppController.

Re: year only combobox

2011-01-24 Thread Joshua Muheim
I have problems understanding your question. If you have a date field in your model, then $this-Form-input('date') should result in a day select box, a month select box and a year select box. If you have a datetime field, then it should also result in hour/minute/second select boxes. You can also

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

2011-01-21 Thread Joshua Muheim
Interesting point! At the moment I don't have any such features, so I guess I remove my $whitelists and think about this as soon as required. :-) Have a nice weekend, Mark! On Fri, Jan 21, 2011 at 4:22 PM, euromark dereurom...@googlemail.com wrote: yes, that should be enough :) but what about

Re: Having a little trouble with url rewriting on production server --psybear

2011-01-21 Thread Joshua Muheim
Nobody's got an idea? :-( This is quite frustrating. On Fri, Jan 21, 2011 at 10:24 AM, psybear83 psybea...@gmail.com wrote: Hey everybody I never had to deploy a CakePHP app to a production server before, and now I'm a bit stuck. While my app works like a snap on my development machine, URL

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

2011-01-20 Thread Joshua Muheim
Thank you, Amit. I remember having noticed that, and then it didn't work, probably because of something else... And then I forgot again. ;-) Thanks anyway! On Thu, Jan 20, 2011 at 4:48 AM, Amit Badkas amit.sanis...@gmail.com wrote: Hi, Form helper's select() method needs attributes as 4th

Re: CakePHP 1.3.7 released

2011-01-20 Thread Joshua Muheim
Thank you! After some months of working with CakePHP I now really like the framework. :-) I'm looking forward to 2.0! Keep up the nice work! On Thu, Jan 20, 2011 at 7:22 AM, keymaster ad...@optionosophy.com wrote: Firstly, Mark - a tremendous thank you and feelings of admiration for your

Re: ApiGenerator plugin: Exclude plugins directory... and some other questions. --psybear

2011-01-19 Thread Joshua Muheim
Thank you, Mark! On Tue, Jan 18, 2011 at 3:00 PM, mark_story mark.st...@gmail.com wrote: Indented code blocks don't work.  You need to use fenced code blocks. {{{ This should be code }}} -Mark On Jan 13, 4:22 am, Joshua Muheim psybea...@gmail.com wrote: And another question: I'd like

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

2011-01-19 Thread Joshua Muheim
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 dereurom...@googlemail.com wrote: sry, i meant $this-Form-input() ^^ On 19 Jan., 14:27, psybear83 psybea...@gmail.com wrote: Hey everybody This is a very basic one,

Re: ApiGenerator plugin: Exclude plugins directory... and some other questions. --psybear

2011-01-18 Thread Joshua Muheim
clean coding and leave old dirty roads... :-) I can suggest to everyone to use api generator, it is a very useful tool. On Mon, Jan 17, 2011 at 4:54 PM, Joshua Muheim psybea...@gmail.com wrote: Thanks, Mikek, this already helps a lot! On Mon, Jan 17, 2011 at 4:46 PM,  mi...@brightstorm.co.uk

Re: ApiGenerator plugin: Exclude plugins directory... and some other questions. --psybear

2011-01-17 Thread Joshua Muheim
Isn't there anybody using ApiGenerator? On Thu, Jan 13, 2011 at 11:28 AM, Joshua Muheim psybea...@gmail.com wrote: Another one: I have constants in my classes like so:  /**   * Grenze, nach welchem Lebensjahr der Zivi höchstens noch 26 Diensttage pro Folgejahr bis Dienstende aufweisen darf

Re: ApiGenerator plugin: Exclude plugins directory... and some other questions. --psybear

2011-01-17 Thread Joshua Muheim
: [exclude] properties = private methods = private directories = webroot, tmp, static, locale, vendors, .svn, plugins files = index.php, empty I dont know the answers to your other questions. regards mikek On Thu, Jan 13, 2011 at 11:28 AM, Joshua Muheim psybea...@gmail.com wrote: Another

Re: Off Topic Question

2011-01-14 Thread Joshua Muheim
Some time ago, I looked into this web stress tool: http://www.paessler.com/webstress Quite nice, but I don't have much experience with stress testing, so I can't tell you whether it is a very good solution. On Fri, Jan 14, 2011 at 2:08 AM, Dave Maharaj m...@davemaharaj.com wrote: Not so much

Re: to Test or not to Test

2011-01-13 Thread Joshua Muheim
to variables and it already helps MORE than not using it at all - even if the time to write the tests wasn't that big of a deal. as soon as you have more time you can work on the coverage task again. but testing itself is a must! On 7 Jan., 15:52, Joshua

Re: ApiGenerator plugin: Exclude plugins directory... and some other questions. --psybear

2011-01-13 Thread Joshua Muheim
And another question: I'd like to have code examples in my method descriptions. I know that I can put them into back ticks for inline code, but it seems I can't create blocks of code using 4 spaces?! /** * Constructor. * *This should be code */ Thanks for informations. On

Re: ApiGenerator plugin: Exclude plugins directory... and some other questions. --psybear

2011-01-13 Thread Joshua Muheim
in the documentation. Is this normal? Aren't constants added to the API documentation? On Thu, Jan 13, 2011 at 10:22 AM, Joshua Muheim psybea...@gmail.com wrote: And another question: I'd like to have code examples in my method descriptions. I know that I can put them into back ticks for inline code

Re: to Test or not to Test

2011-01-07 Thread Joshua Muheim
Dear netusco I know exactly what you mean - most CakePHP tutorials about testing aren't that great; they expect you already have plenty of ideas on why testing is good, and they only explain how in theory you can use the SimpleTest library to test your CakePHP apps the same way you have already

Re: Documenting a small CakePHP project: Best practices? --psybear

2011-01-06 Thread Joshua Muheim
, 2011 at 10:34 AM, Joshua Muheim psybea...@gmail.com wrote: OK, I downloaded the plugin, placed it in app/plugins/api_generator, and run the installation tutorial. The two tables have been created and populated with some stuff. But now I don't know how to open the API. I guess I have to open

Re: Documenting a small CakePHP project: Best practices? --psybear

2011-01-06 Thread Joshua Muheim
@ John: No no, I know that this wouldn't be the right place. :-) It's just that I want to exhaust all the standard possibilities for documentation that are built into cakephp, so that a later developer will be able to easily manage my codes. On Thu, Jan 6, 2011 at 12:30 PM, John Andersen

Re: Documenting a small CakePHP project: Best practices? --psybear

2011-01-06 Thread Joshua Muheim
Alright, I found it, I have to access myapp.localhost/api_generator/api_classes. Thanks. On Thu, Jan 6, 2011 at 1:00 PM, AD7six andydawso...@gmail.com wrote: On Jan 6, 10:01 am, Joshua Muheim psybea...@gmail.com wrote: Nobody has an idea? I admit I haven't looked too deep into plugins

Re: SimpleTest: assertEquals does not work with DateInterval objects! --psybear

2011-01-06 Thread Joshua Muheim
OK, workaround: $this-assertEqual($x-format('%Y-%D-%M-%I-%S', $y-format('%Y-%D-%M-%I-%S'); On Thu, Jan 6, 2011 at 2:21 PM, psybear83 psybea...@gmail.com wrote: After debugging for 2 hours or so, I finally found the problem why my tests work (but shouldn't)...    $x = new

Re: Documenting a small CakePHP project: Best practices? --psybear

2011-01-05 Thread Joshua Muheim
. Thanks for any hints pointing me to the right direction. :-) On Tue, Jan 4, 2011 at 4:43 PM, Joshua Muheim psybea...@gmail.com wrote: ah, right, just noticed it. but thanks for pointing me to it! :-) On Tue, Jan 4, 2011 at 4:42 PM,  mi...@brightstorm.co.uk wrote: hi josh Thanks, I will take

Re: To use App Controller or not to use

2011-01-04 Thread Joshua Muheim
I don't know if that's your question, but yes you need to create a files app/controllers/app_controller.php; you should NEVER change anything in the cake directory, so leave the cake/libs/controller/app_controller.php file alone. CakePHP will find your own app_controller.php file and load it

Re: Empty automagic dropdown lists make Security component complain? --psybear

2011-01-04 Thread Joshua Muheim
Thanks, cricket. I'm not sure but I believe Ruby On Rails created an additional hidden input field to surpass this specification/limitation; so when there's no value selected in the dropdown, the hidden field's empty value was sent, and when a value was selected, it oversteered the hidden field's

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

2011-01-04 Thread Joshua Muheim
Short answer! I will look into it. Thanks. :-) On Tue, Jan 4, 2011 at 1:12 PM, AD7six andydawso...@gmail.com wrote: On Jan 4, 12:33 pm, psybear83 psybea...@gmail.com wrote: Hey everybody I wonder how to structure my shared components, behaviors, plugins etc. in my Subversion repository? I

Re: Comments plugins

2011-01-04 Thread Joshua Muheim
I don't know this plugin, but this sounds to me like your database tables does not have a username column...? On Tue, Jan 4, 2011 at 2:20 PM, John Maxim goog...@gmail.com wrote: Hi people, I installed this : https://github.com/CakeDC/comments I am having problem with: Notice (8):

Re: Documenting a small CakePHP project: Best practices? --psybear

2011-01-04 Thread Joshua Muheim
Thanks, I will take a look at your API generator. On Tue, Jan 4, 2011 at 4:12 PM, mi...@brightstorm.co.uk wrote: Hey everybody I have to start a small CakePHP application from scratch. I want to do this in a highly professional way, which also means that I want to properly document the

Re: Documenting a small CakePHP project: Best practices? --psybear

2011-01-04 Thread Joshua Muheim
ah, right, just noticed it. but thanks for pointing me to it! :-) On Tue, Jan 4, 2011 at 4:42 PM, mi...@brightstorm.co.uk wrote: hi josh Thanks, I will take a look at your API generator. i cant take any credit for the api_generator. its the one used to make api.cakephp.org a joy to use.

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

2011-01-04 Thread Joshua Muheim
file? Maybe soft links are the solution? Can SVN/GIT manage something like that? On Tue, Jan 4, 2011 at 4:14 PM, euromark dereurom...@googlemail.com wrote: yep, i use a tools plugin containing all those files one svn:external for all :) On 4 Jan., 13:24, Joshua Muheim psybea...@gmail.com

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

2011-01-04 Thread Joshua Muheim
I'll take a look at that, thanks! :-) On Tue, Jan 4, 2011 at 7:24 PM, Miles J mileswjohn...@gmail.com wrote: @Joshua - Yes but if you put everything into a single plugin, then the problem is solved. You are *not* including all those files in the app, you are just making them available

Re: find('list') with conditions of joined tables? --psybear

2010-12-16 Thread Joshua Muheim
Thanks a lot! I'll have to think more about using the recursive option in the future, I guess, anyway... :-) On Fri, Dec 17, 2010 at 6:17 AM, Amit Badkas amit.sanis...@gmail.com wrote: Hi, By default, find('list') sets recursion to -1. That's why you need to set 'recursive' = 0 in the options

Re: Attach behavior to AppModel on the fly? --psybear

2010-12-14 Thread Joshua Muheim
Oh, and another question: should I check whether the model has already the behavior XYZ attached before trying to attach it? (I'm using many behaviors in different plugins etc., so it could happen that a behavior is attached more than once.) On Tue, Dec 14, 2010 at 11:11 AM, psybear83

Re: Form helper: send default values as named params? --psybear

2010-12-14 Thread Joshua Muheim
...@googlemail.com wrote: i would even create a component and pass a whitelist of valid field names this way you can use the code in several controllers and actions :) On 14 Dez., 08:49, Joshua Muheim psybea...@gmail.com wrote: Thanks for this nice hint, Mark. I'll place it there. :-) On Tue, Dec 14

Re: Attach behavior to AppModel on the fly? --psybear

2010-12-14 Thread Joshua Muheim
-Behaviors-attached('MyBehavior'); code to check if a particular behavior attached to a particular model or not Amit Badkas PHP Applications for E-Biz:http://www.sanisoft.com On Tue, Dec 14, 2010 at 5:02 PM, Joshua Muheim psybea...@gmail.com wrote: Oh, and another question: should I

Re: Best plugins presentation ever

2010-12-14 Thread Joshua Muheim
Doing it right now... :-) On Tue, Dec 14, 2010 at 4:08 PM, keymaster ad...@optionosophy.com wrote: Pierre Martin's: Using and Reusing Plugins, given at cakefest. http://www.slideshare.net/real34/using-reusingplugins I tried downloaded it for reference and later re-viewing, but alas, it is

Re: Best plugins presentation ever

2010-12-14 Thread Joshua Muheim
PDF: http://hotfile.com/dl/89428716/225a271/using-reusing-plugins-100904101846-phpapp01.pdf.html PPT: http://hotfile.com/dl/89428946/9e73d67/using-reusing-plugins-100904101846-phpapp01.ppt.html On Tue, Dec 14, 2010 at 5:06 PM, Joshua Muheim psybea...@gmail.com wrote: Doing it right now

Re: Attach behavior to AppModel on the fly? --psybear

2010-12-14 Thread Joshua Muheim
Dez., 17:06, Joshua Muheim psybea...@gmail.com wrote: Thanks, amit. @Mark: You're completely right, but I have a component that assumes that every model has this component attached, and it would be nice if this attaching could be done automatically... So I guess I will have to attach

Re: Best plugins presentation ever

2010-12-14 Thread Joshua Muheim
You're welcome! On Wed, Dec 15, 2010 at 6:04 AM, huoxito huox...@gmail.com wrote: great! 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.

Re: CakePHP 2.0 status

2010-12-14 Thread Joshua Muheim
Interesting topic. On Wed, Dec 15, 2010 at 12:18 AM, Larry E. Masters php...@gmail.com wrote: You can look at the current guides being written for 2.0 and go from there. Just build your application using PHP 5 features only. What guides do you mean? Is there a CakePHP 2.0 guides collection

Re: Simple join = array('Post') creates invalid SQL command! --psybear

2010-12-13 Thread Joshua Muheim
11, 6:57 pm, Joshua Muheim psybea...@gmail.com wrote: Thanks, but while hoping that DRY and convention over configuration would apply here too, adding these informations still results in an invalid SQL statement: SELECT COUNT(*) AS `count` FROM `meta_tags` AS `MetaTag` Post posts left

Re: Simple join = array('Post') creates invalid SQL command! --psybear

2010-12-13 Thread Joshua Muheim
it for? On Mon, Dec 13, 2010 at 10:01 AM, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: Change the alias in joins array, else it will appear in the SQL twice. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 13 Dec 2010, at 08:50, Joshua

Re: Simple join = array('Post') creates invalid SQL command! --psybear

2010-12-13 Thread Joshua Muheim
Thanks, this hint helped a lot! :-) On Mon, Dec 13, 2010 at 4:58 PM, nachopitt nachop...@gmail.com wrote: Try using $this-recursive = -1; before executing the finder. On 13 dic, 05:33, Joshua Muheim psybea...@gmail.com wrote: It's getting better... It now returns the correct count

Re: Form helper: send default values as named params? --psybear

2010-12-13 Thread Joshua Muheim
Thanks for this nice hint, Mark. I'll place it there. :-) On Tue, Dec 14, 2010 at 12:19 AM, euromark dereurom...@googlemail.com wrote: you should do that in the action in the else part of if (!empty($this-data)): http://www.dereuromark.de/2010/10/07/cakephp-beginner-tips/ On 13 Dez.,

Re: Simple join = array('Post') creates invalid SQL command! --psybear

2010-12-13 Thread Joshua Muheim
Looks interesting! I will take a look at it, thank you AD! On Mon, Dec 13, 2010 at 10:17 PM, AD7six andydawso...@gmail.com wrote: Why don't you just bind the association. $this-bindModel(array('belongsTo' = array('Post' = array(.. any thing or nothing ..; and use recursive of 0. A lot

Re: Do you use baker?

2010-12-12 Thread Joshua Muheim
I'm using the bakery (you mean the cake bake command line, do you?) at the beginning of projects... afterwards I'm normally faster just copy/pasting the files I need... I suggest you learn using it, because in the beginning it's quite useful to get working code from which you can learn a lot. And

Re: Using or not using PHP framework

2010-12-12 Thread Joshua Muheim
Or put it into your libs directory and load it using App::import('lib', 'MyClass/my_class') which will load libs/my_class.php in both cases (even if my_class.php is in a subdir of libs). On Tue, Dec 7, 2010 at 6:19 AM, CyberSprinters cybersprint...@gmail.com wrote: If you want to use a class,

Re: Simple join = array('Post') creates invalid SQL command! --psybear

2010-12-11 Thread Joshua Muheim
Thanks, but while hoping that DRY and convention over configuration would apply here too, adding these informations still results in an invalid SQL statement: SELECT COUNT(*) AS `count` FROM `meta_tags` AS `MetaTag` Post posts left LEFT JOIN `posts` AS `Post` ON (`MetaTag`.`post_id` =

Re: Is it okay to have a hasOne relation, where some records DON'T have one? --psybear

2010-12-07 Thread Joshua Muheim
Thanks, guys. :-) On Tue, Dec 7, 2010 at 2:03 PM, euromark dereurom...@googlemail.com wrote: i did it the same way I just named it UserInfos :) but the relation can be 0 or 1 - so thats absolutely fine On 7 Dez., 12:09, Bogdan Bursuc bogdanbursu...@gmail.com wrote: No it's fine.

Re: Is it okay to have a hasOne relation, where some records DON'T have one? --psybear

2010-12-07 Thread Joshua Muheim
in the UserProfile's table, and not in the User's table? Instead of Users.user_profile_id, we could use UserProfiles.user_id? This way there could really only one UserProfile record belong a User record...? On Tue, Dec 7, 2010 at 2:38 PM, Joshua Muheim psybea...@gmail.com wrote: Thanks, guys. :-) On Tue, Dec 7

Re: Is it okay to have a hasOne relation, where some records DON'T have one? --psybear

2010-12-07 Thread Joshua Muheim
at 4:53 PM, Joshua Muheim psybea...@gmail.com wrote: OK, thought a bit more about this topic. What about when a User has two UserProfile records in the database table pointing at him? In this case, CakePHP simply seems to take the first one and ignores the second. But somehow this seems unclean

Re: Is it okay to have a hasOne relation, where some records DON'T have one? --psybear

2010-12-07 Thread Joshua Muheim
. On 7 Dez., 16:53, Joshua Muheim psybea...@gmail.com wrote: OK, thought a bit more about this topic. What about when a User has two UserProfile records in the database table pointing at him? In this case, CakePHP simply seems to take the first one and ignores the second. But somehow

Re: Using or not using PHP framework

2010-12-03 Thread Joshua Muheim
Funny, I first learned Ruby On Rails, too, and then dove into CakePHP (because at my current job they don't know anything about a programming language called Ruby... sadly). I first had quite some struggles because I was used to the comfort of RoR and really missed some stuff in CakePHP, but now I

Re: Have my own Controller::var variable that is not overridden by descending AnotherController::var (but merged)? --psybear

2010-12-02 Thread Joshua Muheim
Thanks for pointing me into the right direction! :-) On Thu, Dec 2, 2010 at 11:56 AM, Amit Badkas amit.sanis...@gmail.com wrote: Hi, Controller does merging of 'uses', 'helpers' and 'components' only by default, please have a look at __mergeVars() method in cake/libs/controller/controller.php

Re: $scaffold: Display only certain fields to the user (index/view)? --psybear

2010-12-02 Thread Joshua Muheim
Thanks, Mark! I know that it's not supposed to be used in that way, but I have my reasons why I'm asking it. I noticed that I can unset keys in the Controller::viewVars['scaffoldFields'] variable to get what I want. On Thu, Dec 2, 2010 at 3:28 PM, euromark dereurom...@googlemail.com wrote: in

Re: Using or not using PHP framework

2010-12-02 Thread Joshua Muheim
I have stopped working without a framework in the background years ago, and I only can recommend it. There's SO much stuff you don't even know about that's handled by a good framework in the background (all sorts of hacking-attempts is taken care of, for example), and with a good plugin system

Re: Forms security: Not displaying input means it is protected? --zivi-muh

2010-11-29 Thread Joshua Muheim
(which unfortunately doesn't work well with multiple models and saveAll) as a last line of defense in case something goes wrong and a modified request slips through. Regards Joshua Muheim schrieb: Thanks for the hint to the $whitelist, Stephen. But this seems not necessary to me

Re: Which upload plugin/behavior/component do YOU use? --psybear

2010-11-26 Thread Joshua Muheim
thanks, odd. Anyone else has an opinion on an upload thingie? :-) On Thu, Nov 25, 2010 at 10:00 AM, odd fihr87364hjkfhdjf6374hfz7z3h7...@trash-mail.com wrote: I'm using David Perssons Media Plugin because it is very flexible, makes media modification/conversion (thumbnails, compression, type

Re: Forms security: Not displaying input means it is protected? --zivi-muh

2010-11-26 Thread Joshua Muheim
Thanks for the hint to the $whitelist, Stephen. But this seems not necessary to me anymore when using the Security component (which I do and I forgot to mention in my first post). Look at this (http://book.cakephp.org/view/175/Security-Component): When using the Security Component you must use

Re: Behaviors that arm models with new public methods, e.g. $model-readRandom()?

2010-11-23 Thread Joshua Muheim
So far I didn't come to a better solution than just wrapping the methods I want to implement: class AppModel extends Model { function someFunction($params) { return BetterModel::someFunction($params); } } But I remember that there's some OOP function in PHP5 that catches missing methods,

Re: Behaviors that arm models with new public methods, e.g. $model-readRandom()?

2010-11-23 Thread Joshua Muheim
-thisisabehaviormethod() etc so i would recommand using behaviors - thats pretty much exactly what those behaviors are supposed to do they enhance your current model. e.g. Tree Behavior: genereteetreelist() can then be called in the model itself, like you wanted to On 23 Nov., 09:02, Joshua Muheim

Re: Behaviors that arm models with new public methods, e.g. $model-readRandom()?

2010-11-23 Thread Joshua Muheim
Oh, and is there a standard way to check whether a behavior is loaded? E.g. when creating behaviors that are depending on other behaviors? Thanks, Josh On Tue, Nov 23, 2010 at 3:08 PM, Joshua Muheim psybea...@gmail.com wrote: Oh great, I was exactly on the right track but didn't dig deep enough

Re: Behaviors that arm models with new public methods, e.g. $model-readRandom()?

2010-11-23 Thread Joshua Muheim
Thank you, Majna! On Tue, Nov 23, 2010 at 10:17 PM, majna majna...@gmail.com wrote:  if ($this-MyModel-Behaviors-attached('Translate')) http://api13.cakephp.org/class/behavior-collection#method-BehaviorCollectionattached On Nov 23, 3:09 pm, Joshua Muheim psybea...@gmail.com wrote: Oh

Re: Drop down menu not retrieving last inserted element in IE

2010-11-23 Thread Joshua Muheim
Internet Explorer is known to be very buggy in such things. Can you post the HTML source code? On Tue, Nov 23, 2010 at 7:57 PM, cricket zijn.digi...@gmail.com wrote: On Tue, Nov 23, 2010 at 6:10 AM, Master Ram ramganga...@gmail.com wrote: Hi.. all I have problem with IE drop down menu. i

Re: Model data array: how to examine which model it comes from?

2010-11-19 Thread Joshua Muheim
One other thing: Questions of passing a model to the view aside, models should be agnostic with respect to access control and authentication. That's a good point. I'm currently fine-tuning my solution and will release it as a component. Let's see if it will be liked. :-) Check out the new

Re: Model data array: how to examine which model it comes from?

2010-11-18 Thread Joshua Muheim
Yes you're right, jeremy, I made this example up (my real User model doesn't have an Address, I just added this to show that there are cases where there's more than one key that isn't another array itself). The reason why I'd like to know this is the following. I have implemented a simple ACL

Re: Trying to test a controller but autoRender=false doesn't seem to stop rendering!

2010-11-18 Thread Joshua Muheim
Thank you, Miles! On Wed, Nov 17, 2010 at 8:04 PM, Miles J mileswjohn...@gmail.com wrote: I usually do: $this-autoLayout = $this-autoRender = false; On Nov 17, 1:57 am, psybear83 psybea...@gmail.com wrote: Hi all That's my automatically generated controller test: ?php /* Comments Test

Re: Model data array: how to examine which model it comes from?

2010-11-18 Thread Joshua Muheim
solution yet, but I expect it to be very useful. On Thu, Nov 18, 2010 at 7:07 PM, cricket zijn.digi...@gmail.com wrote: On Thu, Nov 18, 2010 at 11:15 AM, Joshua Muheim psybea...@gmail.com wrote: Yes you're right, jeremy, I made this example up (my real User model doesn't have an Address, I just added

Re: Why only pass $data to view instead of model instance?

2010-11-17 Thread Joshua Muheim
Yeah, I like this discussion. Nice to have different views on the same issue and learn something. Thank you, guys! I guess, what RoR guys often forget, is that Ruby is a lot more a powerful language than PHP, so it can do magic that PHP can't and so for PHP frameworks one solution is better than

Re: Why only pass $data to view instead of model instance?

2010-11-16 Thread Joshua Muheim
a dataset for the view. However, there is nothing stopping you creating these extra models. $this-set('data', new UserDataModel($this-User-find())); On Nov 12, 5:23 am, Joshua Muheim psybea...@gmail.com wrote: I'd like to warm up this topic again. :-) I decided to pass model instances

Re: CakePHP should be more strict with unclean configuration, e.g. when specifying missing components! --psybear

2010-11-16 Thread Joshua Muheim
Thank you for your replies. I was not aware that false is returned, so I'm taking back my accusation that CakePHP is lazy. Still I'd like to have an option that CakePHP automatically cries when in development mode... On Sat, Nov 13, 2010 at 5:32 PM, mark_story mark.st...@gmail.com wrote: Also

  1   2   3   4   5   >