How to disable some radio buttons? if using $form->input()?

2010-11-07 Thread Louie Miranda
I have this array... $ccbanks = array( "VISA" => "VISA", "MasterCard" => "MasterCard", "AMEX" => "AMEX"); And my view... input('Shipping.shipping_mode', array( //'div' => false, 'class' => 'sepradio', //'label' => false, 'legend' => false, 'type' => 'radio', '

Re: Best way to route old fashioned PHP url to cake style

2010-11-07 Thread Miles J
I would do it in the htaccess file. No need to leverage PHP logic for this. On Nov 7, 10:24 pm, pz wrote: > Hi All, > > I am rewriting my old site with Cake 1.2.  The old site has may urls > that people bookmarked and search engines indexed.  I want to keep > those url working.  What's the best w

Best way to route old fashioned PHP url to cake style

2010-11-07 Thread pz
Hi All, I am rewriting my old site with Cake 1.2. The old site has may urls that people bookmarked and search engines indexed. I want to keep those url working. What's the best way to handle them? in httpaccess file? or cake route file? for example: if someone type in www.example.com/contacts

Re: autoLinkUrls in text helper

2010-11-07 Thread cricket
On Sun, Nov 7, 2010 at 8:51 AM, euromark wrote: > i did partly succeed > http://pastebin.com/NfmDC27L > > the protocol is stripped and the length is shortened (if desired) > BUT it appends the additional option keys/values as attributes of the > link tag: > > http://www.cot.ag/cuIb2Q/eruierieriu-e

Re: Get the last insert id

2010-11-07 Thread kevando
Thanks guys! I used your advice running a query on the latest ID. I dont have to worry about a race condition so it works great, thanks! -- View this message in context: http://cakephp.1045679.n5.nabble.com/Get-the-last-insert-id-tp3236536p3252664.html Sent from the CakePHP mailing list archive

Paginated Model Question

2010-11-07 Thread Dave Maharaj
Not sure if I have been looking at this all wrong. But where do you paginate from? For example User hasMany FavoritePosts You do not want to actually paginate the favourites (id, user_id, post_id) you want to actually page the Post records from the post_id in FavoritePosts So I have my

Re: autoLinkUrls in text helper

2010-11-07 Thread euromark
i did partly succeed http://pastebin.com/NfmDC27L the protocol is stripped and the length is shortened (if desired) BUT it appends the additional option keys/values as attributes of the link tag: http://www.cot.ag/cuIb2Q/eruierieriu-erjekr"; stripProtocol=0" maxLength="12"> etc Details: Equal e

Re: Client specific translations?

2010-11-07 Thread John Andersen
Make your own I18N class and change the translate method to do what you want. Best wishes, John On 5 Nov., 08:44, Henrik Gemal wrote: > I need to have client specific translations in a project of mine. > > The project is already translated into 2 languages "eng" and "dan". > > The project serv

autoLinkUrls in text helper

2010-11-07 Thread euromark
hey guys currently the text helper autoLinkUrls() creates links with the same name as href: text http://www.url.de more text => text < href="http://www.url.de";>http://www.url.de more text this gets really ugly if the urls are 100 to 200 chars long. how could i extend that method in order to achi

Re: Mistaken render when debug is set to 0 (all ok if I re.set on 2)

2010-11-07 Thread Mariano C.
Number helpers was not added to helpers array. Resolved! On 7 Nov, 11:09, "Mariano C." wrote: > No statical call to debug. > This lines was the problem: > > format($top_author['readers'], > array('before' => '', 'places' => 0, 'thousands' => '.')).""; ? > > > > > As you can see, i've just comment

Re: Mistaken render when debug is set to 0 (all ok if I re.set on 2)

2010-11-07 Thread Mariano C.
No statical call to debug. This lines was the problem: format($top_author['readers'], array('before' => '', 'places' => 0, 'thousands' => '.')).""; ? > As you can see, i've just commented the lines and everything works. Just a simple number format. Why this stop everything in debug=0 but it's ok

Search Plugin by CakeDc

2010-11-07 Thread hmv
I am trying to implement the Search Plugin from CakeDc. - I want to do a generic Seach from the header I have Few models like these restaurants(id, name, address, avg_cost, landmark, area_id,...) modules(id, name) Items (id, module_id, item_id) Dishes(id, name, title, restaurant_id) Areas(id