Re: Implementing social networking using CakePHP

2011-03-03 Thread Bogdan Bursuc
My suggestion is wait for cake 2.0 or start using right now till u finish u'r network it will probably be released for production. It has many many great new features. I already use it. On Thu, Mar 3, 2011 at 4:08 PM, Sam Bernard wrote: > http://book.cakephp.org/ > > As to the benefits/drawbacks

Re: Defining php functions in views

2010-12-20 Thread Bogdan Bursuc
I once come across this just needed a recursive function in a view, so in order to use the helpers I just sent them as params: function getLink($x, &$html) { return $html->link($x, '#'); } getLink('xxx', &$html); if you use php5 > I think this "&" isn't necessary. On Mon, Dec 20, 2010 at 10:08

Re: Is it okay to have a hasOne relation, where some records DON'T have one? --psybear

2010-12-07 Thread Bogdan Bursuc
No it's fine. On Tue, Dec 7, 2010 at 1:00 PM, psybear83 wrote: > Hey everybody > > I have just split up my User model into a User and a UserProfile > model, because I wanted to prevent my User model from having too much > fields (address data, profile data etc.). So now my User hasOne > UserProfi

Re: simple one-to-many question

2010-12-03 Thread Bogdan Bursuc
You must set to the view the variable called authors like so $this->set('authors', $this->Book->Authors->find('list')); Cake FormHelper transforms key_id in to a select and he is looking for a variable called authors in your view to populate that select. On Fri, Dec 3, 2010 at 11:08 AM, Hans Wiri

Re: UpdateAll strange behaviour

2010-12-02 Thread Bogdan Bursuc
You could also try $this->$ModelTabelA->recursive = -1; before the update On Thu, Dec 2, 2010 at 6:01 PM, Adrian Arnautu wrote: > Hello again, > I might found a part of the solution - unBindModel > $ModelTableA->unBindModel(array( >     'hasMany'   => array('C', 'D') > )); > This way the ActiveRe

Re: CakePHP Model uses the wrong fields in SQL statements!

2010-11-16 Thread Bogdan Bursuc
I think there is an explanation to this. To me it seems just imposibile to generate this. Something somewhere is certainly wrong. And I don't thing cake is. Why not check the core ? For example try: recursive => -1 See if happens again. Does this happens on every call ? On Tue, Nov 16, 2010 at 7

Re: beforeFilter() after initialization of components but before beforeRender? --psybear

2010-11-11 Thread Bogdan Bursuc
Why do you need one ? On Thu, Nov 11, 2010 at 7:18 PM, psybear83 wrote: > Hi all > > Is there a filter that runs after the initialization of components but > before beforeRender? > > Thanks for help > Josh > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with thei

Re: Routing table

2010-08-18 Thread Bogdan Bursuc
I think there is a way. You can take a look at Router::connect, it accepts a parameter Router which is a class that extends CakeRoute and you can implement there something and you do Router::connect('/some/complicated/link', array('controller' => 'pages', 'action' => 'display', 'p2'), array('route

Re: CakePHP 1.3 Form customize first Legend field created

2010-07-28 Thread Bogdan Bursuc
$this->form->inputs(array( 'fieldset' => false )); On Thu, Jul 29, 2010 at 12:09 AM, spheroid wrote: > Using echo $this->Form->create successfully followed by echo $this- > >Form->inputs to create quicker forms. > > How do I customize/remove the first Legend created? I don't like the > automat

Re: Email validation in cake php 1.3 version

2010-06-03 Thread Bogdan Bursuc
Validation::email($email); On Thu, Jun 3, 2010 at 12:17 PM, CakeFan wrote: > Hi > I want to validate email address in cakephp 1.3, but i didn't find any > suitable answer > Please help me for this. > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePH

Re: Using fixtures

2010-05-31 Thread Bogdan Bursuc
I think they are imported automatically during the test. On Mon, May 31, 2010 at 6:04 PM, Yannick ANSQUER wrote: > Hi > > I've created a fixture file like in > http://book.cakephp.org/view/1201/Preparing-test-data > but i didn't understand how to populate my database with it. > > Anyone knows ? >

Re: Prefix routing problem

2010-05-28 Thread Bogdan Bursuc
ect('/aktivieren/', array('controller' => 'users', > > 'action' => 'activate', 'admin'=>false, 'prefix'=>false )); > > Router::connect('/aktivieren/*', array('controller' => 'user

Re: Prefix routing problem

2010-05-27 Thread Bogdan Bursuc
You need to define the master route, also: Router::connect('/aktivieren/', ...); That's the router you access when you enter /aktivieren. On Fri, May 28, 2010 at 2:05 AM, cronet wrote: > Hey, > > i defined the following route: > >Router::connect('/aktivieren/*', array('controller' => 'u

Re: How write where condition for this " ('2010-05-19' >= c.start_date AND '2010-05-19' <= c.end_date) " in cake php

2010-05-19 Thread Bogdan Bursuc
The first query is more easy like this: array('Campaign.start_date BETWEEN ? AND ?' => array($startDate, $endDate) Try it, will work on cake. and the second is simple array('c.start_date <=' => $value, 'c.end_date >=' $value) Tip: read http://book.cakephp.org/view/1017/Retrieving-Your-Data On W

Re: Problems with admin routing in 1.3 stable

2010-05-19 Thread Bogdan Bursuc
Same here, works fine. On Wed, May 19, 2010 at 9:34 AM, #2Will wrote: > Not sure if this helps, but im running 1.3 stable with admin routing > and its working ok, so it might be something else going wrong. > > i have: > >Configure::write('Routing.prefixes', array('admin')); > > in config

Re: CakeMate and VIM

2010-05-16 Thread Bogdan Bursuc
What is CakeMate ? On Sun, May 16, 2010 at 12:53 PM, ramonmaruko wrote: > How do I use CakeMate on VIM? I have the cakemate repository cloned > under the plugins directory. cakemate.vim is located inside the ~/.vim/ > plugin directory. > > While using the :M command while I'm on a controller, a

Re: Sorting using HABTM Join Table's additional field

2010-05-15 Thread Bogdan Bursuc
Sat, May 15, 2010 at 1:25 PM, ashok.b wrote: > If I add a order column in Posts, then I won't be able to order the > posts per category... What ever order I set to a post will be > applicable across all categories that post is linked to... I'm looking > for per category orde

Re: Cake tags

2010-05-15 Thread Bogdan Bursuc
I think you should consider taking a better look at the HtmlHelper, if you want all cake. It's now laughable I use it myself. http://api13.cakephp.org/class/html-helper On Sat, May 15, 2010 at 9:26 AM, Ed Propsner wrote: > For most of you this is going to seem so trivial that it's almost laughab

Re: Sorting using HABTM Join Table's additional field

2010-05-15 Thread Bogdan Bursuc
Add in your Post Model class Post extends AppModel { var $order = 'CategoriesPost.postorder'; } Anyway I wouldn't do it like so. I would just add an order field on the Post model. It's easier. On Sat, May 15, 2010 at 1:24 AM, ashok.b wrote: > > > Hello Cake Gurus, here's my problem: > > T