Re: Association help for an internal table hierarchy

2006-06-23 Thread gremlin
also this assumes you have your categories table with a name field. --~--~-~--~~~---~--~~ 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

Re: Association help for an internal table hierarchy

2006-06-24 Thread gremlin
I use even shorter keys id and pid since I like short names. I was writing out long names to make them obvious in the source as to what they are. Use whatever names you want. Just make sure to use cake conventions or make sure you set the table and all of the keynames in the model

Re: Mutually exclusive associations

2006-10-12 Thread gremlin
Martin Schapendonk wrote: On 10/11/06, AD7six [EMAIL PROTECTED] wrote: However, strictly speaking it does not provide any way to prevent an Address to belong to a Person and an Organization at the same time. ? If on the address table there are 2 fields 'class' and 'foreign_id'

Nested categories controller and routing

2006-10-30 Thread gremlin
If I create a model with a relationship to itself ie a nested categories model with a belongs to and has many relationship I can easily enough get a set of nested categories data. The problem for me is that if I wish to reference the content related to that category I must either reference it

Re: Nested categories controller and routing

2006-10-31 Thread gremlin
I have thought of all of this before and none of these solutions quite seems to solve my problem. I need to be able to recover the id for the category entry in order to reference various related models to generate the content. The number of parameters in the url needs to be dynamic and must

Re: Nested categories controller and routing

2006-11-01 Thread gremlin
this shouldn't be a problem. you just need to split the args in the categories index () function. You then build you complexity in there, perhaps limiting your depth to 4 /cat/subcat/subsubcat/id The limit is absolutely not an option. I think perhaps a arg count on the parameters could be

Re: Nested categories controller and routing

2006-12-27 Thread gremlin
I solved this differently than suggested. This thread has my solution for those interested. http://groups.google.com/group/cake-php/browse_thread/thread/6c7cdd0cc5160a19/ac0466a2764df27f?lnk=gstq=gremlinrnum=2#ac0466a2764df27f --~--~-~--~~~---~--~~ You received

Re: Reverse recursive findAllThreaded queries?

2007-01-01 Thread gremlin
gwoo that is the model I used. Nothing I have found works to lookup the id of a category when the category tree is passed via the url as params. The function crazylegs wrote is logically sound but why would I execute N queries to get to the id only to use it to do lookups against other tables?

Re: Blueprint CSS + Cakephp

2008-10-15 Thread gremlin
you need to include screen, then print, then ie *in conditional comments* then the fancytype. On Sep 27, 6:30 pm, Sam Sherlock [EMAIL PROTECTED] wrote: no reason why it should not work unless your css is not found blueprint has a llib directory and plugins (perhaps not any more) which I

Re: Suggestion: Improving the cakephp homepage

2008-09-23 Thread gremlin
There is nothing in the core having to do with a Calendar. That might explain why you failed to find one. More importantly, you seem to be under the impression that because you saw something somewhere having to do with a Calendar ( I assume you mean a javascript date picking widget ) referenced

Re: Simply aligning form-input fields and labels nicely....

2008-09-23 Thread gremlin
Toby - you seem to be using the google groups as a source for all your answers. Might I reccomend that you learn to use the api.cakephp.org pages and the book.cakephp.org pages as a reference before posting here? On Sep 22, 7:17 am, RichardAtHome [EMAIL PROTECTED] wrote: Note: div

Re: DatePicker / Calendar popup

2008-09-23 Thread gremlin
I already answered your question Toby. The datepicker class is added to the date input element. That is all that cake has to do with it. After that it is purely javascript. The javascript is then using the classname to attach a behavior to the element. The javascript is not a part of the CakePHP

Re: Returning false from beforeValidate wont abort save

2008-09-23 Thread gremlin
beforeValidate runs before validation, but doesn't actually prevent saving. If there is something you need to check that prevents saving a record, you should put the logic in beforeSave -Abba On Sep 21, 8:34 am, Novice Programmer [EMAIL PROTECTED] wrote: got that... Need to set soem field as

Re: FileUpload behavior and multiple models

2010-09-25 Thread gremlin
Don't wrap the DS with curly braces if you are going to use the concatenation operator. Just do 'uploadDir' = img.DS.shirts On Sep 21, 9:05 pm, Wanna be baker ray.crawf...@gmail.com wrote: I have a Shirt which has many different images - shirt_image - thumb_on_image - thumb_off_image -

Re: Custom router question

2010-10-13 Thread gremlin
What about a custom routing prefix ( ie. admin routing ) - just add 'reports' to the prefix array and then in the sales controller do a reports_index function and in the customers controller define a reports_index function and cakes default routing will give you the 2 urls you used as an example.

Re: a problem regarding id field in url

2011-01-10 Thread gremlin
The edit form should include either a hidden field for id, or pass the current id in the url via the action param. On Jan 9, 12:06 pm, manas gajare manas.prince...@gmail.com wrote: I am facing an issue about 'id' field in the regular * localhost/project/comments/edit/5* structure. Let's say I

Re: Server Preference?

2011-01-14 Thread gremlin
Use firebug / Safari inspector / Chrome inspector View source is the tool of last resort - I honestly haven't hit view source in a decent browser for years now. On Jan 14, 12:05 pm, Dave Maharaj m...@davemaharaj.com wrote: Thanks Miles. I am sure any of the servers would work fine but each

Re: Same code in controller, model and view

2011-02-17 Thread gremlin
I already answered this guy on StackOverflow telling him exactly this. He didn't listen then and I doubt he will now... On Feb 16, 8:16 pm, Dr. Tarique Sani tariques...@gmail.com wrote: Just for day names and format you need helpers/behavior and components? Pray why? How you display a date

Re: extracting data within tags

2011-02-21 Thread gremlin
You should ask that question somewhere *NOT SPECIFIC TO CAKEPHP* On Feb 21, 7:02 pm, johnlaw johnnugroh...@gmail.com wrote: Hi,, I'm a newbie in php.. I have xml files from which i want to extract it into information in .txt file... can anyone show me how to convert this,

Re: Possible Memory Leak

2011-02-21 Thread gremlin
Maybe write it as a console script? Or find some way to batch through the requests using multiple http requests. On Feb 21, 7:30 pm, Dr. Tarique Sani tariques...@gmail.com wrote: Web servers are simply not designed to have such long single requests The best would be to use shell with short php

Re: Possible Memory Leak

2011-02-21 Thread gremlin
Oops - Tarique beat me to it. On Feb 21, 7:30 pm, Dr. Tarique Sani tariques...@gmail.com wrote: Web servers are simply not designed to have such long single requests The best would be to use shell with short php scripts and some sort of a queue system, which allows you to stop and resume your

Re: views = 1234... numbers

2011-02-25 Thread gremlin
Speaking of moot points, it's moot not mute On Feb 11, 3:09 am, Sam Sherlock sam.sherl...@gmail.com wrote: FWIW the suggestions made by Ryan Jeremy are better than using the Model Query method as you lose out on the cake auto magic with the method $this-Video-doIncrement($id); vs

Re: v1.3 App::Objects not finding controllers in app/controllers/subfolders

2010-04-29 Thread gremlin
App::build( array( 'controllers' = array( DS . join( DS, array( 'parts', 'to', 'your', 'path' ) . DS, ... other paths for controller lookup ), )); should work for you. I am not sure if you need to set the normal path as one of the array items or not. Play around and let us

Re: v1.3 App::Objects not finding controllers in app/controllers/subfolders

2010-04-29 Thread gremlin
29, 8:00 pm, Miles J mileswjohn...@gmail.com wrote: Yeah but if you are going to do that, you might as well just use plugins, lol. On Apr 29, 6:38 pm, gremlin abba.bry...@gmail.com wrote: App::build( array(     'controllers' = array(         DS . join( DS, array( 'parts', 'to', 'your

Re: v1.3 App::Objects not finding controllers in app/controllers/subfolders

2010-05-01 Thread gremlin
Also *I* sometimes want my controllers in sub-folders as an easy way to use the File / Folder classes and folder locations to act as a quick way to generate a filtered list of controllers. I have one project with simple controllers in a widgets folder that all inherit from a different parent

Re: I need full ORM example

2010-05-03 Thread gremlin
The point here is that you obviously haven't read the manual. Why should we be helping someone who hasn't bothered to read the excellent materials provided? Second, your question is answerable with a quick google search. Google for cakephp complete application tutorial and *READ THE ENTIRE MANUAL*

Re: Breadcrumbs

2010-06-24 Thread gremlin
I think something similar to the form input syntax would be good. Have it return nothing but links, all in one string and allow some options i.e. : around, before, first, between, last as keys to input html around, before the first item, between all items ( meaning between consecutive links - not

Re: Validation - Multiple attempts

2010-07-01 Thread gremlin
Make sure if you are passing id's for edit actions that the edit action is in the forms action attribute ie array( 'url'=array( 'controller'='foo', 'action'='bar',$foo['Foo'] ['id'] )).. Also, if you use char(36) for id's then you get UUID's - and it would be really unlikely that a user will

Re: CakeFest IV - America - Help us pick a location!

2010-01-11 Thread gremlin
Portland OR, San Francisco CA, Sacramento CA, San Jose CA so that some of us West Coasters can get some love. Corporate travel is expensive and difficult to get approved these days so something for us Left Coasters would be appreciated this time around. On Jan 7, 7:18 pm, Chris Roush

Re: Form Helper

2008-04-03 Thread gremlin
As long as the field is a date field in the database you should be able to simply use $form-input( 'Model.datefieldname' , ... ) as usual. I believe it autocreates a number of select boxes. Good luck._ On Mar 28, 3:53 pm, shabba [EMAIL PROTECTED] wrote: I'm trying to use the form helper to

Re: Another Confused User on 1.2 Validation (field required)

2008-04-07 Thread gremlin
'rule' = VALID_NOT_EMPTY, 'required' = true On Apr 7, 10:21 am, Duro [EMAIL PROTECTED] wrote: Furthermore...The solution I mentioned in my previous post does not quite work the way I'd hoped. It allows single words (ie. test123), but if you put spaces in the field (ie. test 123) it doesn't

Re: Weird problem with validation, bug?

2008-04-09 Thread gremlin
You should use add a field i.e 'change_password' to the model's validation array. You can then use the Security::hash to hash that value for saving in the action. http://www.littlehart.net/atthekeyboard/2008/01/22/simple-user-registration-in-cakephp-12-part-ii/ should help you somewhat. The

Re: FormHelper: unwanted required class

2008-04-09 Thread gremlin
Also var $validate = array( 'fieldName1' = array( 'rule' = 'ruleName', // or: array('ruleName', 'param1', 'param2' ...) 'required' = true, 'allowEmpty' = false, 'on' = 'create', // or: 'update' 'message' = 'Your Error Message' ) ); from the book -

Re: Re-saving user re-hashes password

2008-05-05 Thread gremlin
in the case of a password field - where the field should *always* be cleared when the view loads - all of the clearing logic should be at the view level. Using the form helper e( $form-input( 'User.password', array( 'type' = 'password', 'value' = '' ) ) ); I believe that should do the trick for

Re: searching for a newsletter component

2007-05-07 Thread gremlin
Both are capable of internationalizing your email campaigns I believe. As for european solution, I don't know of any of the top of my head. Both services are quite cheap. I think campaignmonitor is $5.00 U.S. + $0.05 U.S. for each email recipient beyond the first 5 ( they let you set up a 5

Re: Using jquery's Ajax functions in tandem with CakePHP...

2007-07-02 Thread gremlin
You can call a script the same way, just use $( #quote p ).load( / contoller/action ); Make sure your controller handles ajax requests. If you don't know what that means look up requestAction or parseExtensions in the groups. On Jul 2, 10:12 pm, Jim Newfer [EMAIL PROTECTED] wrote: I have been

Re: Using jquery's Ajax functions in tandem with CakePHP...

2007-07-03 Thread gremlin
PROTECTED] wrote: Gremlin, thank you so much for your reply! So far it isn't working but in the top of my javascript I have arequestAction, and in my controller I set something like this if(isset($this-params['requested'])) { return array('stories' = $getstories, 'school

Re: Workflow engine for cake

2007-07-24 Thread gremlin
All of the workflow issues are DOMAIN SPECIFIC PROBLEMS and should * NOT * be in the framework. If you need a workflow solution you could use CakePHP to * MAKE * one that did exactly what you needed - or even better make a general workflow solution and release it as a Behavior / Component /

Re: Siloing in cakephp?

2007-08-17 Thread gremlin
I have had good success by using a model function to generate a custom query from the url. Search for other posts on nested categories for some solutions. I generally resolve the id of the article/category - whatever is nested - using a recursive function in the model and then pass that along to

Re: How to make a good use of Elements and DRY principe ?

2007-08-17 Thread gremlin
What you need to do is write an index action for your users_controller like you would if you were NOT using ajax or reusing that action at all. Once you have that done, modify that function to check isset( $this- params['requested'] ) to see if the view action if being called via the

Re: How to make a good use of Elements and DRY principe ?

2007-08-17 Thread gremlin
into the #element. Remember you need to play with the RequestHandler component and either extension parsing or request handling code to serve the ajax view in a blank layout. Again have fun with this stuff. Let us know what you come up with. On Aug 17, 1:41 pm, gremlin [EMAIL PROTECTED] wrote: What you

Re: On the road to Da Vinci 2.0

2011-03-02 Thread gremlin
The awful thing is I read it all and I think I may have actually understood what he was saying.. Please don't ever post an esoteric rant again - this is a list for asking questions about how things work, not to brag about how long you have been in the DaVinci fan club while blaming developers for

Re: How to properly use conditions in model associations

2011-03-02 Thread gremlin
I tend to define conditions in associations on very few occasions. One good use is for polymorphic models (you need to define the field = modelName mapping) and for models that have a enum field (or similar) that determines some behavior of the model. IE log models and for defining self

Re: Pretty URLs and Lighttpd

2011-03-21 Thread gremlin
More important - why are you trying to use lua scripts for lighthttpd when you seem to be working on a MAMP install? (apache) On Mar 21, 4:08 am, AD7six andydawso...@gmail.com wrote: On Mar 21, 1:27 am, axel9641 axell9...@gmail.com wrote: Hi Folks  I am new to CakePHP. I am going through

Re: cache action not working

2011-03-22 Thread gremlin
Do you have debug set to 0? If you are seeing the query log then you likely don't and with a setting of anything higher than 0 the cache is cleared on each call to the action. On Mar 22, 2:27 pm, André von Arx avon...@gmx.net wrote: I've tried to cache a controller action without success.

Re: CakeDC users plugin

2011-03-22 Thread gremlin
Just a guess - is there a routes file in the plugin that you didn't copy over to your config/routes.php? A route mapped from /users/add to /users/register would make sense for this sort of error. On Mar 22, 10:15 am, Ryan Schmidt google-2...@ryandesign.com wrote: Perhaps I should be asking: is

Re: Validate HABTM Multiple

2011-04-04 Thread gremlin
Are you using the 'with' key in the model relationship? Are you doing it in both directions? I don't know if it will help but I vaguely remember something along these lines. On Apr 3, 11:41 am, Krissy Masters naked.cake.ba...@gmail.com wrote: Nothing. I simply want to first make sure no more

Re: User/Admin definable forms (schemaless forms)

2011-04-04 Thread gremlin
Look into EAV structures. Basically you build tables that map data types (field types) to their values and the owning model by name and id. A polymorphic behavior would do most of the work. There are a few of on github that google finds pretty easily. This of course doesn't do the form building

Re: Security component and HTTP Basic Authentication

2011-04-06 Thread gremlin
Actually - he asked for http basic digest authentication. Meaning all of his protected pages will pop up the browser credential window instead of the html form based login that auth promotes. Before you criticize the poster for making zero sense and not having read your own question maybe you

Re: hasMany problem !!

2011-04-25 Thread gremlin
You need to edit your view file. You can do a debug( $variableName ) on the data you are sending to the view. You will notice a different array structure for hasMany as compared to hasOne. On Apr 24, 9:34 am, taq taqman...@gmail.com wrote: databasehttp://upic.me/i/v4/database.jpg book

Re: My warning and eror

2011-05-03 Thread gremlin
You need to read the manual: Try the following - it seems you are confusing the $name property with the $uses property of the controller. ?php class MembersController extends AppController { $name = Members; $uses = array( Member, Myprofile ); // notice these are model

Re: Set::extract on an array containing one element

2011-05-03 Thread gremlin
@Otavio - that has nothing to do with the question. On May 2, 7:51 pm, Otavio Martins Salomao otaviosalo...@gmail.com wrote: u try this! foreach($test as $element)      $result = $element['Deep1']['Deep2']['extract']; 2011/5/2 Gluckens danny30...@gmail.com Hi everyone, I'm trying

Re: Problem with the CakePHP Search Plugin

2011-05-16 Thread gremlin
You didn't follow the instructions correctly. You have to attach a behavior to the Post model. From the very beginning of the documentation you linked : public $actsAs = array('Search.Searchable'); On May 16, 10:19 am, Alonso edaloicar...@gmail.com wrote: Hi, folks. I've trying to use the

Re: Ajax helper Error

2011-05-16 Thread gremlin
var $helpers = array( ); // Notice it is plural - you have $helper On May 16, 7:10 am, Carachi carach...@gmail.com wrote: Hi, I try to use the Ajax Helper to receive data for an html select and to send the form to a page, but I have this problem, in the view compare: Notice (8): Undefined

Re: Am I Violating MVC?

2011-05-19 Thread gremlin
Personally I dislike all the methods mentioned. This is configuration data - load it from a config file. In your bootstap.php do a Configure::load( 'forms' ); somewhere near the bottom. Then in /app/config/forms.php put the configuration information for the select options. $config[ 'Forms' ][

Re: Am I Violating MVC?

2011-05-19 Thread gremlin
the id and the value, making it hard to interpret: What does '3' mean? Let's go and look in the code - oops, I don't know how to. Jeremy Burns Class Outfit jeremybu...@classoutfit.comhttp://www.classoutfit.com On 19 May 2011, at 15:19, gremlin wrote: Personally I dislike all

Re: user signup auth component stopped working

2011-05-19 Thread gremlin
Is there a plugin / controller action doing some sort of resizing of a profile image or something? If there is do you have auth set to allow un-authorized users to hit that action? On May 18, 5:54 am, Foroct forrestfraz...@gmail.com wrote: It appears that the problem is related to David

Re: Am I Violating MVC?

2011-05-20 Thread gremlin
@Jeremy: I think you misunderstood me. My point was that both the array-source and a db-table are good solutions to the problem and that you don't *need* to have your unique key be meaningless in either. You can use a 'slug' type of key in the array source or a unique key constraint on the data

Re: FormHelper custom label overriding inputDefaults

2011-05-24 Thread gremlin
You could create a custom helper that extends the formhelper and write an input function that merges the keys you need instead of resetting them. Use the helper's existing input function as a starting place. The portions handling the use of options is pretty clear. On May 24, 1:42 pm, Tomek Mazur

Re: binary(36), es cambiado por blob(36) en las pruebas.

2011-06-06 Thread gremlin
UUID is char(36) not BINARY(36) On Jun 3, 10:11 am, adgranados adgrana...@gmail.com wrote: Estoy manejando un modelo llamado canal, y para la llave primaria, estoy utilizando, como tipo de dato, binary(36), para que cakephp genere un UUID. el problema, es que cuando, intento correr el test,

Re: binary (36), is changed by Blob (36) in testing.

2011-06-06 Thread gremlin
I answered your other thread also - Binary(36) does nothing to generate UUID - try char(36) instead. Why would you want your UUID to be only 0's and 1's? The correct column type is in the documentation - maybe try reading it. On Jun 3, 10:03 am, adgranados adgrana...@gmail.com wrote:  I am

Re: web music player for cake php 1.3

2011-06-08 Thread gremlin
Also - the frontend (player) has nothing at all to do with your backend (cakephp) On Jun 8, 3:40 am, mi...@brightstorm.co.uk wrote: Hi guys, I wanna know abt good music player for my new web site, it should be worked with cake php 1.38 and it should be capable of playing list of song

Re: FPDF or PDFlib with Cake

2011-06-30 Thread gremlin
If the fpdf libraries are at all recent you shouldn't have to use the goofy php4 constructor. I think if you add your custom pdf class to your vendors folder and instantiate it from a custom helper as a member variable you could do a lot more, much more easily. I actually enjoyed this question so

Re: count(*) how to retrieve?

2011-07-09 Thread gremlin
You can also use a virtualField in the DepartmentBook model. The virtualFields end up indexed into the correct array as if they were real fields - this means you don't have to shuffle your results around before using the data. I put together a little gist showing what I mean.

Re: Auth redirect problem

2011-07-12 Thread gremlin
Try setting the loginRedirect to the Controller::referer( ) function i.e. 'loginRedirect' = $this-referer( ) On Jul 12, 6:09 am, pushpa nc.pus...@gmail.com wrote: I am having trouble getting the Auth component redirect. I have a login form and I want to keep the user on the page he logs in

Re: advice on refactoring beforeFilter in app_controller

2011-07-12 Thread gremlin
Start with breaking the chunks out into smaller private functions. See if that helps. On Jul 5, 1:59 pm, Zeu5 kimc...@gmail.com wrote: Hi there, the beforeFilter function in my app_controller over time has grown into a monstrous 300 line code. in that beforeFilter, i do things like

Re: validation is not working properly and generating Notice (8): Undefined property error

2011-07-20 Thread gremlin
There is no set function in the Model class so the line $this-Contact- set( $this-data) is obviously not going to work. The controller has a Controller::set function for sending data to the views. If you want to load the Contact model and prefill it with data use $this-Contact-read( $this-data[

Re: Does this suggestion for core feature make any sense? Please let me know.

2011-07-21 Thread gremlin
Why not use a custom passed key = value pair in the original element call and handle the logic in your element itself. ie echo $this-element( 'element_name', array( 'birds' = $birds, 'controller' = $this-controller )); On Jul 21, 1:53 am, OldWest jason.wy...@gmail.com wrote: I was recently

Re: How to display hasMany association in the view

2011-07-21 Thread gremlin
It also looks like in at least your sample code you were sending $Practicioner to the view and trying to loop over $Practicioners (notice one is plural - one is singular) On Jul 21, 10:46 am, mthabisi mlunjwa mmlun...@gmail.com wrote: Thanks Jeremy! I used $practitioner['Practice'][0]['town']

Re: HABTM again!

2011-07-21 Thread gremlin
What is being said is that you have some conventions you didn't follow. As a result, you are writing overly-complicated code to handle what should be automatic within the framework. Do this: 1) move / rename your users_links table and data to a links_users table inside mysql. 2) remove

Re: Model relations beginner question..

2011-07-21 Thread gremlin
If your UserType table has some a name or title field cake will automatically use it when populating drop down lists created with Model::find( 'list' ). If you have a field that you use as a group name or title - which it seems you do - that isn't called name or title you have to set the

Re: Ordering images that belong to a product

2011-07-21 Thread gremlin
First, passing 'product.id' to the parent_id param isn't going to work unless you have a field literally named parent.id in your images table. Second, unless you are going to relate images to each other using a parent-child structure you do not need a tree - and using the tree behavior for

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

2011-08-15 Thread gremlin
Or use a virtual field. On Aug 15, 11:44 am, Roland Pish rolandp...@gmail.com wrote: Thanks Jeremy. I looked at the cookbook with the link you provided and I realized that I'm having the same output as the example showed there, the 'MIN(Product.price) as price' field is returned in the array

Re: calling Controller::render() from a model

2011-08-18 Thread gremlin
I think you are likely over-complicating the issue. What you seem to really need is an event dispatching system that can fire off events that your models, controllers, etc can simply respond to. Interestingly enough - there is a plugin for that. https://github.com/m3nt0r/eventful-cakephp This

Re: joining strings in model

2011-09-09 Thread gremlin
You can't do that in *any* php class - you have to already have the class constructed before $this-name is set - so how would your class know how to set $this-name inside a property before instantiation? You *can* do this in the __construct( ... ) function. On Sep 9, 10:28 am, lyba

Re: Using $this-set in view doesn't set the var

2011-09-13 Thread gremlin
Keep in mind - when you are doing $this-set from an element: You aren't calling View::set - you are calling Element::set. Why would you expect that to behave as if it was an instance of the View class when it isn't? Also, the two pass rendering of CakePHP means that in order for what you propose

CakePHP 2.0.0-RC2 Conslole baking error

2011-09-21 Thread gremlin
I originally thought this error had to do with my path setup - I had separated the core from the app so I could work more easily with git submodules, so I ignored it. I just did a fresh checkout from the git repo / a download of the RC2 source / and a cakeinit install of the 2.0 package (also uses

Re: redirect with # does not work in Opera and IE but in FF and Chrome?

2011-11-18 Thread gremlin
Looks as it you are using a named field syntax to pass the hash # param. Try this: $this-redirect( array( 'controller' = 'pages', 'action' = 'display', #{$this-params['pass'][0]} )); Notice that I don't use quotes around the numeric array index - that isn't needed and is actually

Re: Student wanting your views on CakePHP

2011-11-22 Thread gremlin
I would first recommend that you use a list less than 4 years old. On Nov 22, 12:16 pm, david mitchell shadowdavid...@googlemail.com wrote: Hi, Coders. I am currently studying Website Development at the University of Bolton and am doing my final dissertation on the features, usability and

Re: Can a plugin component auto-load a helper

2011-12-09 Thread gremlin
Yeah, pay attention to what was shown above your reply - you are setting the facebook helper's name to be the key of the array but the code above your reply is very clearly not setting the key to the helpers name but using a normal numeric index. On Dec 9, 2:52 am, Toby G

Re: meioupload sql error

2011-12-09 Thread gremlin
Is your form created with the form helper and did you remember to do type='file' in the options? This error happens when the form isn't set to multipart/form-data as the file field returns an array of keys with info about the uploaded file. On Dec 9, 2:45 am, Elizabeth Pardede

Re: Javascript Helper modification. Opinions, please.

2011-12-09 Thread gremlin
Or - load your jquery with the normal html tag and not the helper and reserve your use of the helper to include scripts that are strictly on a controller/action/view basis. Then your jquery can be the very first thing loaded always - also you could modify the helper by passing in a configurable

Re: Digest for cake-php@googlegroups.com - 25 Messages in 14 Topics

2011-12-12 Thread gremlin
Oops bad reply On Dec 9, 10:35 am, Abba Bryant abba.bry...@gmail.com wrote: Elements included in the layout have known limitations in what they can add to the scripts_for_layout variable. On Fri, Dec 9, 2011 at 8:56 AM, cake-php@googlegroups.com wrote:   Today's Topic Summary

Re: Paginating cached data

2012-05-01 Thread gremlin
Use the 1.3 ArrayDatasource and set the $records member variable to the part of the array you need to use as if it came from a DB in the constructor. Then you can do whatever you want with it. It should be pretty straightforward. On Saturday, April 28, 2012 5:49:30 AM UTC-7, Jeremy Burns

Re: Session unstable?

2012-05-10 Thread gremlin
Try this: http://stackoverflow.com/questions/3594823/mime-type-for-woff-fonts Also didn't HTML5BoilerPlate have something in their (rather long) htaccess file that handled this issue? Might check there. On Thursday, May 10, 2012 3:16:23 AM UTC-7, phpMagpie wrote: On Monday, 9 April 2012

Re: Fast alternative to contains?

2012-07-16 Thread gremlin
Try this - https://github.com/sams/linkable It is a newer version of the old linkable behavior - uses relationships to create joins as well as allows you to create joins on non-default keys. This might be a fairly straightforward drop in replacement for containable in your case. It might

Re: Fast alternative to contains?

2012-07-17 Thread gremlin
Am Dienstag, 17. Juli 2012 01:11:31 UTC+2 schrieb gremlin: Try this - https://github.com/sams/linkable It is a newer version of the old linkable behavior - uses relationships to create joins as well as allows you to create joins on non-default keys. This might be a fairly straightforward

Re: Fat CakePHP

2012-08-08 Thread gremlin
Even using the worst hosting in the world you still should only ever have to upload the core one time. If you have to wait 5 minutes for your isp to move the files to the remote server each time then you are uploading your app and a fresh copy of the core every time you update the site? That is

Re: counting specific files in foldeR?

2012-11-15 Thread gremlin
Here is a link cleaning up the general idea and using some class methods to get, set the values and a member variable to store the results keyed by extension, valued by type. I whipped this up blind so it isn't tested *at all* but it should be pretty understandable.