Re: How do i change default home page?

2006-12-20 Thread flipflops
I'm also a newbie trying to do the same thing. I couldn't get it to work until I realised that the model name in $uses needs to be Uppercase e.g. class HomesController extends AppController { var $name = 'Homes'; var $uses = array('Exhibition'); function index()

Re: Hosting

2008-10-24 Thread Flipflops
For work stuff Rackspace, its not cheap but the support is unbelievably good. Also have had really good experience with www.xcalibre.co.uk (we used them at my job before last) For my own things Dreamhost - its so cheap (at least what I pay is) it might as well be free and its a great for just

Re: Admin + Members suggested setup??

2008-10-31 Thread Flipflops
I've created some sites with multiple admin routes (i.e. members and admin) although only in 1.1 - there is an article about it in the bakery: http://bakery.cakephp.org/articles/view/using-cake_admin-for-multiple-user-types - it works very well. I seem to remember reading that this is built in

Re: Jquery or Scriptalicious?

2008-10-31 Thread Flipflops
Try em both. See you which you prefer. But I vote for jquery. The jquery website is really good with loads of links to tutorials and working examples of everything and even better it is quick now too. On Oct 30, 10:49 pm, Matthieu [EMAIL PROTECTED] wrote: Hello, I'm gonna create a web app

Re: Jquery or Scriptalicious?

2008-10-31 Thread Flipflops
As lots of people have said you miss out on the helpers with jQuery, but if you don't like Prototype then its no great loss - but anyway what I've stared doing is writing a my own bake templates (ad7six wrote a really handy introduction http://www.ad7six.com/MiBlog/CustomBakeTemplates) which i

Re: set global var from DB

2008-11-12 Thread Flipflops
Hi You could also look at using something a bit like the Configure Plugin: http://bakery.cakephp.org/articles/view/configure-plugin I'm using that but caching the data - saving on unecessary database calls - works really well and it very easy to set up. Of course if you just used the plugin out

Re: Help needed for inline WISIWYG editor...

2008-11-14 Thread Flipflops
Good choice... and if you want a bit more go for WYMeditor http://www.wymeditor.org/ which is also jQuery based. Personally I really don't enjoy working with TinyMCE (although haven't tried the latest release) or FCKeditor On Nov 14, 7:54 am, Ketan Shah [EMAIL PROTECTED] wrote:

Re: Working with forms for CMS

2008-11-18 Thread Flipflops
Hi Passing the schema and validation rules seems like a good idea - I'm guessing your are thinking you could couple it with some kind of wizard / interface so you build your forms within the CMS... could be a really goood feature but at the end of the day it boils down to how long the initial

Re: Working with forms for CMS

2008-11-19 Thread Flipflops
to recoup.  Hi Flipflops,  Passing the schema and validation rules seems like a good idea so did I - but I've just realised that my 'EmailForm' model would have it's own schema, at least: - id - name - schema - rules I'll need to add to this, either using a merge or just replacing the array

Re: Very slow response times with CakePHP

2008-12-19 Thread Flipflops
Hi Bernhard The 1.5 - 2 seconds seems really wierd - maybe something to with the file system on the server ( - particularly with safe mode enabled?) For example I think Dreamhost have their shared servers on NFS - and vaguely remember something about a cache plugin for wordpress that even said

Re: Calendar Helper

2009-01-15 Thread Flipflops
Hi Mike I built a calendar helper about a year ago. It is pretty basic - literally just a shell that lays out the days of the week and a back and forward button. Its up to you to get the data to it in the right format. To be honest I always meant to re-factor it and write a component to sit

Re: How to prevent updating other fields when calling model::save()

2009-01-15 Thread Flipflops
Hi I had real trouble finding this the first time too. save(array $data = null, boolean $validate = true, array $fieldList = array()) $fieldList is an array of the fields you actually want to save. http://book.cakephp.org/view/75/Saving-Your-Data John On Jan 15, 12:39 pm, K3

Re: Multiple Uploads with MeioUpload

2009-01-28 Thread Flipflops
Hi I'm using MeioUpload for a current project with multiple images. It is a bit more complicated as I'm saving all the images into a single table using a ploymorphic association (ie. Product hasMany Upload, Profile hasOne Upload etc.) - but this should be helpful anyway The upload fields

Re: Multiple Uploads with MeioUpload

2009-01-28 Thread Flipflops
a seperate entry of MeioUpload for each file input you have on your view form? On Jan 28, 8:04 am, Flipflops johnsv...@googlemail.com wrote: Hi I'm using MeioUpload for a current project with multiple images. It is a bit more complicated as I'm saving all the images into a single table using

Re: Multiple Uploads with MeioUpload

2009-01-28 Thread Flipflops
No worries. Glad to help. John On Jan 28, 3:06 pm, Arak Tai'Roth nielsen.dus...@gmail.com wrote: Perfect, this is exactly what I was hoping for. Thank you very much for your help with this. On Jan 28, 8:43 am, Flipflops johnsv...@googlemail.com wrote: Hi Well you can include

Re: Calendar

2008-05-29 Thread Flipflops
Hi Kyle I've been writing a calendar helper that might be of use to you. It isn't ajax, but I had planned to build in ajax support so it wouldn't be too hard to get it to work. The idea is that you just provide give the helper an array where the key is the day of the month (e.g. 1 to 31) and it

Re: CMS?

2008-06-10 Thread Flipflops
I think we possibly need to get a sense of perspective here. I downloaded and installed a copy of wildflower yesterday and delving through it, it has some very nice bits of code, so I think we should probably be thanking he / she / them for releasing it to the community - it gave me a few ideas

Re: Change Password

2009-09-30 Thread Flipflops
I think the 'password' only gets automatically hashed if there is a 'username' field set as well (and I regularly forget this). So you tend tend to run into problems when you have a view just to update a password. When I remember I use a bit of code like this and has the new password manually:

Re: What the heck? CakePHP is dead?

2009-10-29 Thread Flipflops
Love the new design. Awesome. I think it should stay! On Oct 29, 2:45 pm, ProFire profir...@hotmail.com wrote: I'm gonna mirror the entire website for memories!!! Damn! CakePHP is AWESOME! Even in Halloween! --~--~-~--~~~---~--~~ You received this message

Re: afterFind() dillemna - eats memory for breakfast

2008-01-18 Thread Flipflops
Hi AD7six I like you answer - letting the database use CONCAT leaves your code nice and clean, how exactly are you suggesting to do it though? Can you append it to the model in some way when you use a built in method (e.g. findAll) or were you suggesting creating a custom query function in

Re: afterFind() dillemna - eats memory for breakfast

2008-01-22 Thread Flipflops
Thanks AD7six You learn something new every day. That is certainly a lot easier than a custom query! I downloaded 1.2 last week and am looking forward to trying it out. J --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: model validation - how do you handle different rules for different forms?

2008-04-14 Thread Flipflops
This is the way I do it (haven't tried it in 1.2 - but I see no reason why it wouldn't work). I've been using this in loads of 1.1.x based sites together Evan Sagge's excellent validation code http://bakery.cakephp.org/articles/view/more-improved-advanced-validation In your model define a

Re: SVN based comments

2008-04-15 Thread Flipflops
Its great to know that it's so easy. I've been wondering how this is done but assumed it would be really complicated ! Cheers --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group,

Re: belongsTo relationship killing my app

2008-04-22 Thread Flipflops
Hi Langdon My first though is that you need to look at the recursion for your model and unbind unnecessary model relationships - by default Cake will just pull in masses of related records. You can cut it down by first unbinding anything you don't strictly need and then further only select the

Re: belongsTo relationship killing my app

2008-04-22 Thread Flipflops
of the allocated RAM. I will play with that further and see what I can turn up. Regards, Langdon Flipflops wrote: Hi Langdon My first though is that you need to look at the recursion for your model and unbind unnecessary model relationships - by default Cake will just pull in masses

Re: Keepin both MVC architecture and the old style ..

2008-04-22 Thread Flipflops
Hi I would have thought it is usually better to just start from scratch and just use Cake - certainly for a new project - of course you can still bring over classes and functions from your own code to use in helpers / components etc. It is fairly easy to run CakePHP in a sub directory within

Re: Can cake do this or am I asking too much

2008-05-01 Thread Flipflops
Hi JoC For me one of the things I like most about cake isn't so much managing all the associations (although that is very nice (indeed)) it is the fact that the rigid MVC structure makes it easy to find bits of code because everything has its own place in the structure and is logically

Re: Using a page anchor with Pagination links

2009-03-20 Thread Flipflops
I've been stumped on the same problem, in an instance where I'm using $this-passedArgs But reading this I just has a brainwave - I just added on another item to the end of the array - seems to work fine. $this-passedArgs['#'] = 'album-image-gallery'; $paginator-options(array('url' =

Re: Using a page anchor with Pagination links

2009-03-23 Thread Flipflops
@Brian Thanks for the tip. I'll try that out - its much neater. On Mar 20, 4:50 pm, brian bally.z...@gmail.com wrote: Or this should work, also: $paginator-options(array('url' = am(array('#' = 'album-image-gallery'), $this-passedArgs))); On Fri, Mar 20, 2009 at 12:17 PM, Flipflops johnsv

Re: Tree structure..

2009-03-24 Thread Flipflops
http://dev.mysql.com/tech-resources/articles/hierarchical-data.html The link is actually taken from http://book.cakephp.org/view/91/Tree, but it is easy to overlook. This article explains about what the lft and rgt actually mean in terms of the underlying database design - in a nutshell you have

Re: Paginate Find All Results

2009-03-30 Thread Flipflops
Hi Have you come across this article http://cakebaker.42dh.com/2007/10/17/pagination-of-data-from-a-habtm-relationship/ ? I think the approach outlined in it might be worth looking at, in essence just build all your relationships inside paginate, as if it were just a bit of SQL... On Mar 30,

Re: Paginate Find All Results

2009-03-30 Thread Flipflops
p.s. meant to say I've used this approcah in a number of situations and it works well for me. On Mar 30, 9:10 am, Flipflops johnsv...@googlemail.com wrote: Hi Have you come across this articlehttp://cakebaker.42dh.com/2007/10/17/pagination-of-data-from-a-habtm-... ? I think the approach

$this-render causes openbase_dir restriction error ??

2009-05-05 Thread Flipflops
Hi I've got an action that based on on the parameters passed to it either renders its default view or one of a number of alternate views based on the values in $this-params['pass']; This is stripped back version of the action, $this-render('/sections/ view'); seeme to be what is causing the

Re: Trying to edit User.status but nothing happens

2009-05-05 Thread Flipflops
Hi I assume that you are including sername and password as hidden fields because they are required in your validation array - but rather than include them as hidden fields it might be better to create different validate arrays in your model e.g. var $validate = array(

Re: Setting pagination url problem - something to do with Routes ??

2009-05-05 Thread Flipflops
Sorry forgot to say would be something like: $this-passedArgs = array( [0] = seascapes [1] = summer-seascapes ); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send

Setting pagination url problem - something to do with Routes ??

2009-05-05 Thread Flipflops
Hi I'm trying to paginate a set of results but Cake isn't building the links properly, instead of the correct link the pagination helper is generating links that just output part of my routes config. The pagination is working fine in some parts of my application so something like this is

Re: Memory Limit Exhausted

2009-05-05 Thread Flipflops
As the other posters have said your query is probably trying to pull too much data back, why don't you raise the memory limit in cake until you don't get a fatal error, then you can see what queries cake has been trying to run. Chances are that Cake is trying to pull in data from lots of

Re: Setting pagination url problem - something to do with Routes ??

2009-05-05 Thread Flipflops
'         ),         array(                 'whatever' = '(?!admin|pages|users|photos)'         ) ); Untested, of course. On Tue, May 5, 2009 at 10:04 AM, Flipflops johnsv...@googlemail.com wrote: Hi I'm trying to paginate a set of results but Cake isn't building the links properly, instead

Re: Setting pagination url problem - something to do with Routes ??

2009-05-06 Thread Flipflops
Well... making progress but still not there. Right now I've got: Router::connect( '/*', array( 'controller' = 'nodes', 'action' = 'view', ), array('*' = '(!users|products)') This half works - the pagination is fixed and something

Re: $this-render causes openbase_dir restriction error ??

2009-05-06 Thread Flipflops
Hi Brian Dr Loboto Both of you are absolutely correct, so thanks! I totally misunderstood the manual and was got it into my head that /sections/view would be read from /app/views as /app/views/sections/view (DUH) and using $this- viewPath simply didn't cross my mind. Cheers Guys.

Re: Bake a Cake

2009-05-07 Thread Flipflops
I had a total bitch of time getting PHP CLI working when I moved from Apache2Triad to XAMP on my Win XP laptop - but I did get it working in the end. As I recall PHP was looking at the wrong php.ini file. I appreciate that you are using WAMP not XAMP but I wrote up what I did on my blog - might

Re: When will jQuery be ported into the Cakephp core?

2009-05-08 Thread Flipflops
Although jQuery is flavour of the month at the moment (personally I love it) on a general point is it even a good idea to include a Javascript library in CakePHP, it seems like just another dependency to worry about? Maybe Cake should just worry about PHP but make dealing with AJAX requests as

Re: ClassRegistry::init('ModelName') problem

2009-05-11 Thread Flipflops
Hi Faza I don't think it is a problem with using ClassRegistry::init inside another model as do exactly what you are trying to do quite a lot. (e.g. $link_data = ClassRegistry::init('Link')-get_shared_links();) Perhaps it is something to do with afterFind() ? John On May 11, 12:27 pm, Faza

Re: Poll: what do you hate about CakePHP?

2009-05-13 Thread Flipflops
1. Lets loose PHP4 asap 2. Hidden input fields should a default class applied something like: .hidden-input perhaps - if you have forms with coloured background then it can be a real nightmare making sure hidden fields stay hidden (not everybody uses firefox) - I'm sure everybody has scratched

Re: Poll: what do you hate about CakePHP?

2009-05-19 Thread Flipflops
Absolutely, right about form errors. On May 18, 4:54 pm, dr. Hannibal Lecter lecter...@gmail.com wrote: Here's another interesting kick in the Matt Groening. Inability to use FormHelper::error() to show our own errors on the fly, i.e. $form-error('Arse.biscuits', 'A pair of women's knickers

Re: Using XSL - Should I write Component, Helper or Library?

2009-06-03 Thread Flipflops
Perhaps you could create an element or helper to act as a kind of sub view - you move the code that normally be in the view (i.e. looping through data, building tables etc.) and then return this into a variable in your view rather than just echoing it. You could then do what you wanted with it,

Re: JQuery or Prototype

2007-10-02 Thread Flipflops
Another vote for jQuery... I just really like it's minimalism. I know you don't get the AjaxHelper, but it's really easy to to get to grips with. I spent ages trying to get some Autocomplete fields working with the AjaxHelper and just couldn't get it working properly (I wanted to show multiple

Routes Controller Methods Question

2007-10-24 Thread Flipflops
I've got a question about best practice - it is about forcing everything in a controller through a single method as a result of wanting nice urls I have a controller called Products (based on a table called products) that also uses a table called product_items (products is actually a table of

Re: MVC architecture

2007-11-01 Thread Flipflops
I've recently bought the book a href=http://www.amazon.com/PHP-5- Objects-Patterns-Practice/dp/1590593804PHP 5 Objects, Patterns, and Practice/a - bought it to just read more about Object Orientated PHP and using Design Patterns - BUT having read it (I'm still digesting it really) - it has