Re: CakePHP 2.1 Pagination Helper

2012-04-28 Thread gmwebs
Proper dumb moment! Works fine, thanks. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake

Re: CakePHP 2.1 Pagination Helper

2012-04-28 Thread gmwebs
Seems as if this is the reason - Ticket 1759 - so I guess my question is how to apply a class to the link contained in the wrapping tag? -- Our newest site for the community: Cake

CakePHP 2.1 Pagination Helper

2012-04-28 Thread gmwebs
There is a bit of a change between the way PaginatorHelper::next() behaves in v1.3 and v2.1 which I just can't get my head around. Take the following snippet: echo $this->Paginator->next('Next', array('tag'=>'div', 'class'=>'next_page', 'rel'=>'next'), null, array('class'=>'next_page disabled

Re: Rackspace CloudFiles

2011-12-07 Thread gmwebs
bump... -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.co

Rackspace CloudFiles

2011-12-06 Thread gmwebs
I was wondering if any of you have worked with CloudFiles in any of your CakePHP projects? I need to use it and am rather hoping someone has a datasource or plugin they could share to show how the API calls should be implemented. -- Our newest site for the community: CakePHP Video Tutorials http

Re: ClassRegistry::init vs loadModel

2009-02-10 Thread gmwebs
Gwoo, I apologise if I have missed any posts on this in the past, but... I thought that loadModel() was deprecated? I remember going through all my code and changing it to App::import based on the warning message "loadModel is deprecated see App::import ('Model', 'ModelName');"? Has this (or the

Re: Render speed difference between 1.1 and 1.2

2008-10-23 Thread gmwebs
Hey Mark, You are not alone on this one... I have been involved in a project hosted with MT using CakePHP 1.2 RC3 and the speed is terrible. Takes around 20 to 30 seconds to get to the site! If I put that same site on another dedicated hosting server, it takes a couple of seconds max. I am prett

Re: How can I destroy cookies

2008-09-29 Thread gmwebs
Have you had a look at the Cookie component? More info at http://book.cakephp.org/view/177/Cookies --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googleg

Containable Behaviour

2008-09-29 Thread gmwebs
I am trying out the Containable behaviour but am not getting the correct result (or at least my expected result!). I have a DealerAddress model (for their head office) which is associated to a DealerBranchAddress model (for their branch address) and I want to be able to return all dealers in a sp

Re: Apress Beginning CakePHP Model Function Error

2008-09-19 Thread gmwebs
If you are using the new v1.2 RC2 of Cake then quite a few of the older functions have been deprecated (like the findAll() one) and the syntax for some of them has also changed - i.e. find('all') - it seems that the book is written for this new syntax. If you uprade your Cake version to the latest

Re: trying to make othAuth login process work

2008-09-19 Thread gmwebs
I assume you are using v1.2? You need to replace $html->input and $html->checkbox with the their $form equivalents. i.e. $form->input, $form->text, $form->checkbox, etc. More info at the API docs - http://api.cakephp.org/1.2/class_form_helper.html --~--~-~--~~~---~--~

Re: Question about Cake 1.2.0

2008-05-13 Thread gmwebs
You are referencing the gruppo_id in your first AND clause. Why don't you create the Gruppo model and see if that resolves your issue? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this g

Re: Validation on Update in Cake using VALID_UNIQUE

2008-05-12 Thread gmwebs
I have posted what I have in my User model (running 1.2.x.x) at http://bin.cakephp.org/view/646962640 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@g

Re: ACL Console issues

2008-05-01 Thread gmwebs
Sorry... forgot to tick save. Please see: http://bin.cakephp.org/saved/31645 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscr

ACL Console issues

2008-05-01 Thread gmwebs
I am trying to figure out the Auth/Acl component and have started to grasp how things *should* work, but am having problems creating Aros with the console command. Please would you have a look at http://bin.cakephp.org/view/2059927768 and provide any pointers? --~--~-~--~~

Re: Need tips on keeping Test, Dev, Production In Sync

2008-04-18 Thread gmwebs
We have the exact same scenario that Chris talks about in his blog at the company I work and have found this to be the best way. The great thing about this is that you can always roll back if things go wrong. --~--~-~--~~~---~--~~ You received this message because y

Re: Problems saving with hasAndBelongsToMany (multi_field)

2008-04-15 Thread gmwebs
Oh great... good news. Incidentally, what version of Cake are you using? I think this relates to https://trac.cakephp.org/ticket/3814 but it should have been fixed already... I am using the nightly build which is probably why I wasn't seeing this in my tests. PS - I'll have a pint of Guinness ple

Re: Problems saving with hasAndBelongsToMany (multi_field)

2008-04-15 Thread gmwebs
Progress at least then ;) Is it not maybe the following code in your view: if (isset($this->data[$modelName]['id'])) { echo $form->input('id'); } That is the only block I didn't include in my test. --~--~-~--~~~---~--~~ You received this message because y

Re: Problems saving with hasAndBelongsToMany (multi_field)

2008-04-15 Thread gmwebs
Ok... I have used your view code and it works just fine. I get the following... Array ( [Product] => Array ( [name] => gloves ) [Category] => Array ( [Category] => Array ( [0] => 1 )

Re: Problems saving with hasAndBelongsToMany (multi_field)

2008-04-15 Thread gmwebs
How does the $this-data look now? In my add view, all I am doing is: create('Product');?> input('name'); echo $form->input('Category'); echo $form->input('Color'); echo $form->input('Size'); ?> end(

Re: Auth Password Question

2008-04-15 Thread gmwebs
I don't know what version of Cake you are using, but if you are using 1.2.x.x then try the following as a test in your login view. create('User', array('action' => 'login'));?> Sign in input('username'); echo $form->input('password'); ?>

Re: Problems saving with hasAndBelongsToMany (multi_field)

2008-04-14 Thread gmwebs
I wasn't able to get that script of yours to work, so I set a test up quickly. If I add a product and select the different multi_fields I get this as my $this->data: Array ( [Product] => Array ( [name] => socks ) [Category] => Array ( [Cate

Re: Auth Password Question

2008-04-14 Thread gmwebs
Is it perhaps that your password field on your login form is not labelled User.password? Many tutorials use User.passwd instead. You can also override this by setting $this->Auth->fields = array('username' => 'username', 'password' => 'password'); in your app_controller. --~--~-~--~~--

Re: Problems saving with hasAndBelongsToMany (multi_field)

2008-04-14 Thread gmwebs
Oh, interesting... How about a full output of $this->data then? I know I have had problems saving if the array is not in the correct order. i.e. If you try to do $this->Product->save() then the Product array should appear first in $this->data. Have you turned debug on to 2 - if you have then is i

Re: Problems saving with hasAndBelongsToMany (multi_field)

2008-04-14 Thread gmwebs
Hi Zoe, could you post the controller code? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email t

Re: bug with default controller 1.x

2008-04-13 Thread gmwebs
If you have enabled Cake Admin Routing, when you navigate to www.mysite.com/admin Cake expects you to be trying to perform an Admin action within one of your controllers. So if you had a Posts controller and an action admin_delete in it, if you browsed to www.mysite.com/admin/posts/delete then Ca

Re: image from database as view is too slow

2008-04-13 Thread gmwebs
I once had to store images in a database for a client as he absolutely insisted on it. I also found that serving these images took a lot longer than just directly accessing the image on the filesystem. Granted, it was not a Cake application, but the concepts still hold true. One of the drawbacks

Re: Display progress of an AJAX-called script in a view

2008-04-10 Thread gmwebs
Thanks for the reply Adam... 471 records was just an example - it was more the concept that I wanted to understand. What is dodgy about using the iFrame method? To be honest, that is the only method that I could think of before posting this. --~--~-~--~~~---~--~~ Y

Display progress of an AJAX-called script in a view

2008-04-09 Thread gmwebs
I have been playing around with the Ajax helper and am trying to display the progress of a script, in realtime, called by $ajax- >link(). I have seen how the different callbacks work, but I can't seem to find if there is a way to send a series of responses during the call to the server script. Ju

Re: Running CakePHP in a SubDirectory BUT Emulating Root (On Shared Hosts - NO httd.conf)

2007-12-20 Thread gmwebs
Hey Baz, Have a look at one of my previous threads - http://groups.google.com/group/cake-php/browse_thread/thread/9d3294c250fa5f2b/75bdd50d44924363?lnk=gst&q=installation+in+subdirectory#75bdd50d44924363 - not sure if that exactly describes your scenario but it might help. Regards, Graham --~--

Re: othAuth with Cake 1.2.x.x Nightly Build (5938)

2007-11-03 Thread gmwebs
I take it by POSTs you mean form submissions with a method of POST? Well if so, then no, it does not happen for all POSTs. It seems only to happen with my admin functions. I can navigate the site as a normal user while logged in, but as soon as I log in as an administrator and attempt to edit an

Re: OthAuth with Cake 1.2.0.5875 pre-beta problems?

2007-11-02 Thread gmwebs
I have also been experiencing some issues - I have posted mine this evening to the group as well. Have you seen http://www.ancientwisdom.cc/news/archives/111 which outlines some changes? Might be of some help to you... --~--~-~--~~~---~--~~ You received this mess

othAuth with Cake 1.2.x.x Nightly Build (5938)

2007-11-02 Thread gmwebs
For some reason or another, since upgrading to the latest pre-beta 1.2.x.x I have been experiencing issues with the othAuth component. I have also upgraded to the latest nightly build but it has not made any difference. I followed the instructions in http://www.ancientwisdom.cc/news/archives/111

Re: 1.2 - Paginating data other than Model records

2007-05-25 Thread gmwebs
Yeah, but how would a model that doesn't use db tables present data for Paginate() to use? Sorry if this is an obvious question, but I am seriously not getting this concept :( Thanks, Graham On 25 May, 08:29, AD7six <[EMAIL PROTECTED]> wrote: > On May 24, 5:01 pm, gmwebs <

Re: Sub-folders in pages controller

2007-05-25 Thread gmwebs
themselves without getting in to the code side of things. Thanks for the reply though... On 25 May, 08:44, AD7six <[EMAIL PROTECTED]> wrote: > On May 22, 1:05 am, gmwebs <[EMAIL PROTECTED]> wrote: > > > How do I configure the following? I am using 1.2.0.5137 > >

1.2 - Paginating data other than Model records

2007-05-24 Thread gmwebs
Hi, Is there any way to paginate data other than Model records using the Paginator helper? For instance, I want to paginate an array, not the actual Model records. Something like: Pseudo Code * var $paginate = array('limit' => 3); $fruit = Array('apples','oranges','pears','prunes');

Sub-folders in pages controller

2007-05-21 Thread gmwebs
How do I configure the following? I am using 1.2.0.5137 I want to organise my static pages in subfolders so that views/pages/ products/product1 points to www.mydomain.com/products/product1. I have found plenty of documentation on how to configure routes for normal controller/actions but I can't

Re: Ajax Form With Validation?

2007-05-21 Thread gmwebs
er and pagination features of 1.2 work better > than the components/helpers from the bakery for 1.2 > I'm also a bit fearful of future deprecated functions in 1.2 (eg - > losing functionality as Cake get's 'better'). What are your thoughts? > > I'd love to hav

Re: Ajax Form With Validation?

2007-05-21 Thread gmwebs
Hey Dustin, What version are you using? I have some code for 1.2 custom validation which I don't mind sharing with you, but would be rather pointless if you are using 1.1 :) I went through your exact process a few weeks ago, and have managed to get it all working in 1.2. Graham On May 21, 7:49

Re: sanitizing data with beforeValidate

2007-04-30 Thread gmwebs
Quite a conundrum... If the function is called beforeSave() then the input is not sanitized before being used for validation. Could be an issue when using isUnique() as the database is queried at validation time using unsanitized input data. Could this be a candidate for SQL injection? --~--~---

Re: sanitizing data with beforeValidate

2007-04-30 Thread gmwebs
How would I echo the sanitized input in my form rather than the unsanitized input? If a user were to input non-alphanumeric characters in a username on a registration page for instance, the input is sanitized before validation which means the form validates and the data is saved, but the user will

Re: sanitizing data with beforeValidate

2007-04-30 Thread gmwebs
Thanks Ian... I had the return true in the beforeValidate() but I was trying something in beforeSave() and had neglected to put the return true in there. It works fine now. Regards, Graham --~--~-~--~~~---~--~~ You received this message because you are subscrib

Re: sanitizing data with beforeValidate

2007-04-29 Thread gmwebs
Hi Ian, I had a go using your __sanitize() function and while the actual sanitization is working, I don't seem to be able to save my model. If I view the input before calling __sanitize() in beforeValidate() and then after, it proves that the inputs are sanitized just as expected. Unfortunately t

Re: installation in subdirectory

2006-08-07 Thread gmwebs
Hi Toby, I only have the one app setup at the moment, but this will apply to additional apps as well. I altered the following lines in the index.php file in the webroot (myCakeAppWebRoot) folder... if (!defined('ROOT')) { //define('ROOT', 'FULL PATH TO DIRECTORY WHERE APP DIRECT

Re: installation in subdirectory

2006-08-07 Thread gmwebs
Hi Toby, Do you perhaps have access to the folder above your html (www on my host) directory on the host? For instance, on my host I have the following kind of setup... myAccount -> mydomain1 -> mydomain2 -> CakePHPLibs -> ssl

Re: newbie:othAuth: how to login from a page with a non Admin group?

2006-08-05 Thread gmwebs
Thanks CraZyLeGs, you pointed me in the right direction. I have now amended my login action to this... function login() { if(isset($this->params['data'])) { $user_data = $this->params['data']['User']; $username = $user_data['username']; $pa

Re: newbie:othAuth: how to login from a page with a non Admin group?

2006-08-04 Thread gmwebs
Hi, I am also having this problem... I can login with Admin and everything works, but as soon as I try with a user I created, it just sits there and does nothing after clicking login. Any news on this? Regards, Graham --~--~-~--~~~---~--~~ You received this me