Re: [Dave] Applying code snippets automatically
Hi Dave,
Thanks for the reply.
I think that this could easily end up a complicated mixed bag of tricks, but maybe for universality and simplicity, it should be limited to things that only fit “always applied to every field” situations.
These are the only examples that I've thought of so far, but I'm sure that there are others that would be as useful.
1 and 2 are my most often used. They should be used in every case, but sometimes I forget or get lazy.
3 and 4 are only used in special situations
1) Always check for url, _url_, or url_ in the field name
Let’s say the characters “url” are only used in names of fields that need to be checked for http:// then it could check all of those, every time.
2) errant spaces in otherwise blank fields.
I think that this also is an always. There’s never (that I can think of ) a situation where I’d want a blank space in an otherwise empty field to be a valid situation.
3) Replacing placeholders with spaces. (I use this for instances like Lightbox where a space would break the code)
Maybe there needs to be a more obscure placeholder than a “dash” and these placeholders always get replaced with spaces when echoed.
4) Capitalizing (or decapitalizing) the contents of a field
This would be an on demand thing and maybe shouldn’t be considered for this plugin.
Best,
Jerry
The first CMS Builder reference book is now available on-line!
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php