Get end time from start and duration

2015-05-01 Thread Dan
Hi, I need some help... I have this form with 3 fields: echo $this->Form->input('visit_type_id', array( 'label' => 'Tipo Visita', )); echo $this->Form->input('start', array( 'id' => 'start', 'label' => 'Inizio', 'dateFormat' => 'DMY', 'timeFormat' => '24', 'interval' => 15, 'minYear' => 2

Querying across multiple tables in CakePHP 3.x ORM

2014-12-09 Thread george dan gil Duran
I have three tables *Countries, Cities* and *Addresses*. Their relationship is Countries hasMany Cities, Cities hasMany Addresses. So Its something like this Countries->Cities->Addresses. If I want to get all addresses in a certain city I can do it like this $this->paginate = [ 'conta

Captcha Image Issues

2013-08-16 Thread Dan Crowley
Hi there, I am hoping that someone could possibly assist me or offer some advice on some captcha issues I am having with my site. For some time now the captcha images on forms on the site have been a bit temperamental. They work on some browsers without a problem, but on other machines simply

cakePHP File Download was not found or not readable

2013-08-14 Thread george dan gil Duran
I've been struggling now for an hour trying to fix this. I used this to download file from app/uploads/directory. It says the directory not found or not readable. Yet i checked it and it was there also the file using $file['File']['filename']. I want to know what I am missing here.? $file = $

Issue after upgrade from 1.3 to 2.0

2012-05-08 Thread dan
We're in the process of upgrading our existing 1.3 install to 2.0. After running the upgrade shell, I got this error when trying to load the main page: Fatal error: Cannot redeclare config() in /Applications/MAMP/htdocs/ rdi_dev/lib/Cake/basics.php on line 43 When trying to bake, I get the follow

Running Controller Test blows away database table

2012-05-04 Thread Dan Doyon
blows away the associated item table. I have the latest 2.1.2 version. thx --dan -- 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 unsubs

Re: Unknown time before app_controller beforeFilter

2012-04-23 Thread Dan Moseley
Thanks for the quick replies. I've set up the debug kit and am looking in the timers section: I see "Core Processing (Derived) - 650ms" Any recommendations on where I can dig next? On Monday, April 23, 2012 5:23:18 AM UTC-4, AD7six wrote: > > > > On Monday, 23 Apr

Unknown time before app_controller beforeFilter

2012-04-22 Thread Dan Moseley
ges between 0.2 and 1.2 seconds. If anyone has any recommendations it would be much appreciated! Thanks, Dan Moseley -- 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 Ca

Re: $this->Auth->user VERY slow

2012-04-09 Thread Dan Moseley
Hi AD7six, I'm not sure that I understand what you mean. Do you mean to say that concurrent requests are not possible for a given user? On Monday, April 9, 2012 4:24:32 AM UTC-4, AD7six wrote: > > > > On Thursday, 5 April 2012 17:00:49 UTC+2, Dan Moseley wrote: >>

$this->Auth->user VERY slow

2012-04-05 Thread Dan Moseley
Hi, I have been experiencing extremely long run times for some calls to $this-> Auth->user('id'). Most requests spend 0 time in this method, but seemingly random requests are taking upwards of 60 seconds.. Does anyone have any ideas or recommendations on this problem? Thanks

Is it possible to access AuthComponent from a Helper ?

2011-12-02 Thread Dan
I would like to write a Helper which would check if a given link is authorized for the current user. I'm using CakePHP 2.0. I'm using the AuthComponent with controller authorization. So my authorization logic goes into isAuthorized callbacks. The idea would be to have a helper used in this mann

Re: Detect a route prefix in a given url

2011-10-17 Thread Dan
I just found the solution. So for those who would have the same problem, I used also the Router method normalize. So I chain Router::parse(Router::normalize(Router::url($array_url))). The result is now : *array* 'controller' => string 'pictures' *(length=8)* 'action' => string 'edit' *(lengt

Re: Detect a route prefix in a given url

2011-10-17 Thread Dan
Thanks everyone. I already tried Router::parse, but it doesn't show me a "prefix". In my case, I have this array for my url : array('admin' => TRUE, 'action' => 'edit', $picture['Picture']['id']) If I use it with $this->Html->link, I can see that the url : is http://127.0.0.1/testcake/admin/pi

Detect a route prefix in a given url

2011-10-17 Thread Dan
Hello, I'm trying to find a way to determine if a route prefix will be used for a given url. The url could be a string (like /myApp/admin/Posts/delete/3) or an array of options, like array('controller'=>'Posts', 'action'=>'delete, 3, 'admin'=>TRUE). I found that Router::url($the_given_url) wil

Re: Custom SQL and Populating Form

2010-12-23 Thread Dan
So far, I'm simply doing this: $myarr = $this->query($sql, $params, false); return $myarr[0]; I have to figure out what to do when there are no records returned. The index is wrong when that happens. On Dec 23, 2:50 pm, cricket wrote: > On Thu, Dec 23, 2010 at 8:38 AM, Dan wrote:

Custom SQL and Populating Form

2010-12-23 Thread Dan
Here is some code: Model: class Project extends AppModel { var $name = 'Project'; var $primaryKey = 'project_id'; function customFunction($id=0){ $sql = "custom sql... where project_id = ?"; $params = array( customValidation($id) );

Re: Custom Parametrized Query - IN clause

2010-11-19 Thread Dan
And from the documentation, the params aren't sanitized since I'm not using Cake's ORM?! Anyway to get the Pg object and prepare the statement instead? On Nov 19, 1:26 pm, Dan wrote: > I figured passing an array for one of the parameters would do the > trick, but alas :) &

Re: Custom Parametrized Query - IN clause

2010-11-19 Thread Dan
m. If it > does, though, I'd think that probably should be: > > $params = array(1,2) ; > > On Fri, Nov 19, 2010 at 11:49 AM, Dan wrote: > > I'm looking at running a custom parametrized query. Here's my test > > model: > > > class Project extends AppM

Custom Parametrized Query - IN clause

2010-11-19 Thread Dan
I'm looking at running a custom parametrized query. Here's my test model: class Project extends AppModel { var $name = 'Project'; var $primaryKey = 'project_id'; function testInClause(){ $sql = <

Re: cakephp + jquery help

2010-11-18 Thread Dan
Simply include your *.js in the layout - $html->script('name_here') - and you're done for the jQuery stuff. The other thing would be to create an ajax layout and assign it to the proper controller function: function something(){ var $layout = 'my_ajax_layout.ctp'; } The layouts are in the app

Re: What are the links between relationships and containable?

2010-11-18 Thread Dan
                    'ProfileDataType' > >                                 ) > >                         ) > >                 ) > >         ) > > ); > > > Happy to be corrected, but I think recursion is redundant when using > > contain, so n

Re: What are the links between relationships and containable?

2010-11-18 Thread Dan
late models) and > although not a Cake requirement I'd say it is paramount from a performance > point of view in the database. > > Jeremy Burns > Class Outfit > > jeremybu...@classoutfit.comhttp://www.classoutfit.com > > On 18 Nov 2010, at 12:29, Dan wrote: > >

What are the links between relationships and containable?

2010-11-18 Thread Dan
Basically, can containable work without having relationships specified? Or does containable rely on those relationships? In some tutorials, they specify to use recursive = -1 and then containable to get more optimized SQL. I can't help but think, what's the point specifying the relationships?? Ch

Re: Where clause has hard coded value - where is it coming from?!

2010-11-09 Thread Dan
I forgot to mention that I'm doing a find('list', $conditions). Conditions do not contain any reference to an ID being set to 5. The conditions is an 'OR' with multiple like statements. On Nov 8, 10:20 pm, Dan wrote: > I'm doing this: > echo $this->element(

Where clause has hard coded value - where is it coming from?!

2010-11-08 Thread Dan
I'm doing this: echo $this->element('sql_dump'); In the where clause of one of the statements, I have this: ON ("ClientsProjects"."project_id" = '5' AND "ClientsProjects"."contact_id" = "Contact"."contact_id") I've searched my entire code base and cannot for the life of me find where the hard co

Re: HABTM/Linking table structure question

2010-11-01 Thread Dan
I guess I had to use print_r($this->data) instead of the debugger. On Oct 28, 8:24 am, Dan wrote: > On Oct 27, 4:20 pm, Carlos Lavin wrote: > > > > > It is "standard". However, CakePHP isn't built to manage multi-column PK's, > > always single colu

Re: HABTM/Linking table structure question

2010-10-28 Thread Dan
On Oct 27, 4:20 pm, Carlos Lavin wrote: > It is "standard". However, CakePHP isn't built to manage multi-column PK's, > always single columned > > 2010/10/27 Dan > > > > > On Oct 27, 3:07 pm, cricket wrote: > > > On Wed, Oct 27, 2010 at 8:

Re: HABTM/Linking table structure question

2010-10-27 Thread Dan
On Oct 27, 3:07 pm, cricket wrote: > On Wed, Oct 27, 2010 at 8:07 AM, Dan wrote: > > Structure: > > > Projects > > - project_id > > - project_name > > > Contacts > > - contact_id > > - contact_name > > > Contacts_Projects > > -

HABTM/Linking table structure question

2010-10-27 Thread Dan
Structure: Projects - project_id - project_name Contacts - contact_id - contact_name Contacts_Projects - project_id - contact_id When reading the Cookbook, in a HABTM setting, I should add an ID field to the Contacts_Projects table. Wouldn't this field enable the possibility of having duplicate

Find condition on joined table

2010-10-19 Thread Dan
Hi, I am trying out CakePHP on an existing (and messy) website to see if it is going to be beneficial to use it for the new features from now on. I have been creating a test model that allows admin to search through users based on various fields (userId, name, email address, orderId). I have 3 ta

Model plurality issue/choice

2010-10-12 Thread Dan
For this example, I'll be using the following table name: Rallies. It's primary key is "rally_id". Here's the model that works: class Rally extends AppModel { var $name = 'Rally'; var $primaryKey = 'rally_id'; } However, I initially created this model: class Rallies extends AppModel {

Re: Even though $primaryKey is specified, I still get an error

2010-10-10 Thread Dan
Alright, I got something working: Model Controller class ProjectsController extends AppController { var $name = 'Projects'; function manage($id=0){ $this->Project->id = $id; $this->set('project', $this->Project->read()); } } ?> View ".$p

Even though $primaryKey is specified, I still get an error

2010-10-09 Thread Dan
Here is the code: Rally->id = $id; $this->set('rally', $this->Rally->read()); } } ?> Even though I've specified the primaryKey variable, I still get an error due to the where clause looking for the field name "id" rather than "rally_id". Check out the new CakePHP Question

Need help finalizing the configuration of my CakePHP setup

2010-09-29 Thread Dan
I thought I understood the advanced configuration of CakePHP... however, I keep getting the error stated at the bottom of this email... Cake core: c:\cake\ The rest: c:\Apache2.2\htdocs\app My config file: /** * The full path to the directory which holds "app", WITHOUT a trailing DS. * */

hasMany problems/bug - need feedback

2010-08-27 Thread Dan Heberden
This isn't a "i cant get this or that model or relationship" question, btw :) (this is cake 1.3.2 an i've shortened the selects for readability sake) Consider these models/relationships: User, Group, Post User belongsTo Group User hasMany Post With recursive set to 1, you'd think tha

Re: after adding an hasOne relation to model it is not available in my view anymore

2010-08-20 Thread Dan Heberden
Is debugging on so you can see the sql error? It's having trouble 'finding one' - which is one generative sql call so if IT fails the whole bloody thing fails and you get an empty array. On Aug 19, 2:55 pm, Marcos Mendonça wrote: > have you tried without the 'dependent' => true attribute? > > O

Re: problema com imagens captcha

2010-08-19 Thread Dan Heberden
Is debug set to 0? chances are your application is already sending data and the captcha can't change the header back to image/jpeg.. Configure::write('debug', 0); On Aug 19, 1:52 pm, Juliano Bordignon wrote: > hello > > did not work .. I did that but still showing the codes .. > > is very stra

Re: How to allow and deny different actions based on user's role

2010-08-06 Thread Dan Heberden
Just get the role and apply it? if( $this->Auth->user('User.role') > 1 ) { // is admin $this->Auth->allow( array('secretController' => 'superSecureAction' ) ); } On Aug 6, 1:12 pm, "Mariano C." wrote: > I have users table, with field id, username, password and role. > role is a numeric val

Re: bug with HTML entity encoding of attribute of form elements

2010-08-06 Thread Dan Heberden
o when calling _parseAttribute at line 1475 this option is not > > present causing use of default value at line 336 in helper.php. > > Select attributes will be ALWAYS encoded. > > > Question: > > Should be used different escape options for title/selectoptions in > > f

Re: Countries, States and Cities: Which relations i'm dealing with?

2010-08-06 Thread Dan Heberden
cities.. cool, eh? ) city: $belongsTo = array('State') // city has state_id, which gets it's parent state ( again, you can use containable to get further into state, like get the state's country and ITs capital, etc etc) The use of containable is much more flexible than recursive,

Re: bug with HTML entity encoding of attribute of form elements

2010-08-05 Thread Dan Heberden
Does changing your quote pattern help? echo $this->Form->select('field', array( '1' => '' , '2' => '' ), null, array('onChange' => 'function(\"yyy\")')); \" (because php isn't escaping it) will get sent to the output, which _should_ render onclick="funct

Re: some phone validation rule problem

2010-08-05 Thread Dan Heberden
long) $number = sprintf( "%12d", $number); // 191234567890 On Aug 4, 7:51 am, hoss7 wrote: > @dan thank you,but i have little problem,when i want save '09' in > table i dont have > '09' i have '9' > > if i want user phone number dont start

Re: how can I check if form button is pressed?

2010-08-04 Thread Dan Heberden
Can you post the whole output of: pr( $this->data ); pr( $this->params['form'] ); for me? On Aug 4, 7:35 am, Tomfox Wiranata wrote: > thx dan. unfortunately it does not work yet. > > in my function i did > > print_r($this->data['Linkable']; >

Re: some phone validation rule problem

2010-08-04 Thread Dan Heberden
regex might be a better route: 'mobile' => array( 'rule' => '/^09/', 'message' => 'no ) On Aug 4, 6:06 am, hoss7 wrote: > if i want user phone number dont start with "09" what i am must to do? Check out the new CakePHP Questions site http://cakeqs.org and help others wi

Re: how can I check if form button is pressed?

2010-08-04 Thread Dan Heberden
cute saving method } If you were sending data along too, such as echo $form->hidden('id'); // still assuming the ABC model Then you could check for if( !empty( $this->data['ABC']['id'] ) ) { // run operation } -dan On Aug 4, 6:36 am, Tomfox Wiranata wr

Re: Autocomplete, can't find $this->data?

2010-08-04 Thread Dan Heberden
One note (for future readers too) - you are forcing your form element to GET - only POST data is populated into $this->data. On Aug 3, 8:11 pm, Louie Miranda wrote: > *Solved it!* > > I can't seem to debug($this->data), so I debug($this->params); > > And found the solution. > > $this->params['for

Re: need a little help with model::saveAll function

2009-11-25 Thread FF (dan)
Modifying data in the controller seems to me like a nasty workaround. The reason why your beforeValidate is failing to modify your data is because validation is only run when you call save. You are calling saveAll... so the data beforeValidate sees is in fact just a single record. You *could* ove

Re: broken image - no clue

2009-06-24 Thread Dan Bair
Quick correction: image blob, not image "blog" :) On Jun 24, 3:52 pm, Dan Bair wrote: > I've ran into stuff like this before. In my cases, it was because > there was some sort PHP warning or notice coming from a query or other > PHP logic that goofed out the output of

Re: broken image - no clue

2009-06-24 Thread Dan Bair
I've ran into stuff like this before. In my cases, it was because there was some sort PHP warning or notice coming from a query or other PHP logic that goofed out the output of the image blog. Try turning debug to zero: Configure::write( 'debug', 0 ); or output your script in a way where you wou

Re: HABTM (tags) - using a text input instead of a select.

2009-05-26 Thread Dan Soendergaard
Take a look the the Simple Tagging Behavior: http://bakery.cakephp.org/articles/view/simple-tagging-behavior On May 26, 6:49 pm, number9 wrote: > It really isn't feasible to use a select input since a project I am > working on is likely to produce a large amount of tags. I basically am > looking

Model Association based on user_id

2009-05-13 Thread Dan
r, and call Content->Contain('Score.user_id = $user_id') 3) Use bindModel(...) to add the association to the Content model in the controllers that use it Is there a better way I should be going about this? Thanks, Dan --~--~-~--~~~---~--~~ You received

Re: Need help with Upgrading Cake - best practices: Release: 1.2.3.8166

2009-05-06 Thread Dan
Always upgrade on a development server and test first. Upgrading can break things you wouldn't expect. For example, the recent change of the alphanumeric validation rule to support i18l characters broke the automatic Javascript error checking I use (the new regex isn't valid in JS). Instead of ove

Re: What do you develop in (ide, text editor, etc.)?

2009-03-01 Thread Dan Soendergaard
Gedit :) On Feb 28, 9:14 pm, adam wrote: > I'm using Eclipse with PDT, but Dreamweaver for making layouts. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-p

Re: Complex model relationship problems

2009-03-01 Thread Dan Soendergaard
, mscdex wrote: > On Feb 28, 6:10 pm, Dan Soendergaard wrote: > > > No, the function is in my model so calling $this->Space->find(); > > results in Undefined property:  Space::$Space. > > Sorry, I had forgotten it was a model function and not in your > controlle

Re: Complex model relationship problems

2009-02-28 Thread Dan Soendergaard
entioned in the first post. I also renamed the function and made some convenience functions. Might as well work with the parts that I can get working :) On Feb 28, 11:14 pm, mscdex wrote: > On Feb 28, 2:07 pm, Dan Soendergaard wrote: > > > That doesn't help much, I've tried it

Re: Complex model relationship problems

2009-02-28 Thread Dan Soendergaard
That doesn't help much, I've tried it and it gives errors like this: Model "Space" is not associated with model "name" [CORE/cake/libs/ model/behaviors/containable.php, line 340] for alle fields that I specified for Space.* in the contain options. Also, an invalid query is now being created whic

Complex model relationship problems

2009-02-28 Thread Dan Soendergaard
rray('spaces' => $spaces); } } ?> array( 'with' => 'SpacesUser' ), 'Document' => array( 'with' => 'DocumentsUser' )

Re: __mergeHasMany causing EXTREMELY slow data retrieval

2009-02-05 Thread Dan
Thanks for the replies and suggestions everyone. When I have a chance I will dig deeper into this. I've implemented a workaround that is fine for now. I was mainly curious if this was a known issue or just poor implementation on my part. Pete's suggestion may be the solution, I'll know after I try

Re: __mergeHasMany causing EXTREMELY slow data retrieval

2009-01-30 Thread Dan
No one has feedback on this? It seems like a MAJOR issue if you can't load more than a few thousand rows from "has many" relationship tables. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to

Re: __mergeHasMany causing EXTREMELY slow data retrieval

2009-01-19 Thread Dan
On Jan 16, 4:57 pm, Miles J wrote: > Why do you even need to grab 2800? I need to load them to generate order statistics. Another reason would be for a CSV export. 2800 is very small. We're in the process of developing an app that could have hundreds of thousands of rows in multiple tables with

__mergeHasMany causing EXTREMELY slow data retrieval

2009-01-16 Thread Dan
I've encountered major problem on one of our applications. Cake is taking a very long time creating the resulting data array from a DB query. Here's the scenario: Models: Order has many OrderLineItem Data: About 2800 Orders, each with one OrderLineItem This is part of a function in the Order mod

Re: Getting started with themes and static files

2008-11-26 Thread Dan Bair
If you're going to be having a lot of static pages, it may be worth your while to use Cake's Folder and File objects. You can loop through the .ctp files assign the routes dynamically. Here's a quick snippet that will go through all of the .ctp files in the pages directory. This will be in app/co

Re: Sqlite3

2008-11-23 Thread Dan Knapp
ctually, I happen to store my local sqlite db right outside the app dir, but anywhere within the webserver's chroot (if your server uses a chroot) should work. It's configurable. On Nov 23, 12:49 pm, WidgetMan <[EMAIL PROTECTED]> wrote: > Hi Dan, > > I too have been extreme

Sqlite3

2008-11-23 Thread Dan Knapp
Hi, all! I've been using Cake for a couple days now and am very pleased with it. I joined this group to advocate that the patch in this trac ticket be rolled into 1.2: https://trac.cakephp.org/ticket/3003 It seems there's been a fair amount of guerilla testing of it already, as several people

Sqlite3

2008-11-23 Thread Dan Knapp
Hi, all! I've been using Cake for a couple days now and am very pleased with it. I joined this group to advocate that the patch in this trac ticket be rolled into 1.2: https://trac.cakephp.org/ticket/3003 It seems there's been a fair amount of guerilla testing of it already, as several people

Re: saving HABTM (RC3)

2008-11-20 Thread Dan Walton
You mentioned saveAll, yet your code doesn't look like it's using saveAll, did you catch this? On Thu, Nov 20, 2008 at 7:47 PM, Lukas <[EMAIL PROTECTED]> wrote: > > Any ideas? > > On Nov 18, 1:13 am, Lukas <[EMAIL PROTECTED]> wrote: > > Still, I cant make it work :( > > > > For testing, i have cr

Re: Related model of related model of model?

2008-11-20 Thread FF (dan)
re you talking about recursive? > Take a look at the manual page:http://book.cakephp.org/view/439/recursive > > Regards, > > > > On Thu, Nov 20, 2008 at 11:30 AM, FF (dan) <[EMAIL PROTECTED]> wrote: > > > Currently using $this->Model->read() fetched data in th

Re: Related model of related model of model?

2008-11-20 Thread FF (dan)
0, 1:30 pm, "FF (dan)" <[EMAIL PROTECTED]> wrote: > Currently using $this->Model->read() fetched data in this format: > > Model >   -> Record > Related Model >   -> Record(s) > > Is it possible, when using $this->Model->read(), to gr

Related model of related model of model?

2008-11-20 Thread FF (dan)
Currently using $this->Model->read() fetched data in this format: Model -> Record Related Model -> Record(s) Is it possible, when using $this->Model->read(), to grab records in this format? Model -> Record Related Model -> Record(s) -> Related Model ->Record(s) TIA --~--~--

Re: how to display users' country from country table in product list

2008-10-15 Thread Dan Bair
Hi Gabriel, You'll have to set the recursive property of the Product model to fetch the associated countries. You should also make sure that the correct relations are set in your three models ( Product, User, Country). Here's a quick overview of how recursion works with CakePHP's models: http://

Re: Sortable AJAX list doesn't trigger update

2008-08-30 Thread Dan Soendergaard
> I think the problem is that you use $item['Item']['id'] for your item- > IDs and not an incrementing number. But I am not sure, maybe it's only > the format, you could try "item_" instead of "item-", you can also set > the format as option with a regular expression. Wow! I simply changed "item-

Sortable AJAX list doesn't trigger update

2008-08-30 Thread Dan Soendergaard
being sent to the server when I drag an item, and the Java Console doesn't show any errors... So, I'm completely out of ideas of what the problem could be. The HTML being sent to the browser looks like this http://bin.cakephp.org/view/389641311 Any help is appreciated :) Sincerely

Re: Is ACL what I should be using?

2008-08-26 Thread Dan Bair
If you haven't yet, reading up on Cake's built-in ACL (http:// book.cakephp.org/view/171/access-control-lists) should get you off to a pretty good start. If not, the bakery has plenty of alternatives you can poke around with (bakery.cakephp.org) At the company I used to work for I started on a ba

Re: File upload

2008-08-20 Thread Dan Soendergaard
I've written this behavior which I typically use for file uploads. It's short and pretty easy to use, maybe you'll find it useful. You can set the directory in which the file should be saved by setting the option "destination". If you attact the behavior like this, $this->YourController->Behavior

Re: Set root entry in Tree Behavior and fetch children?

2008-07-02 Thread Dan Soendergaard
Hah! It's not a problem at all, got it working using your sweet TreeHelper ;) Amazing work, thanks! On Jul 2, 4:09 pm, Dan Soendergaard <[EMAIL PROTECTED]> wrote: > That looks good, and you're right. However, I'm not an MPTT expert so > it was obvious to use recursion

Re: Set root entry in Tree Behavior and fetch children?

2008-07-02 Thread Dan Soendergaard
with. Any good ideas? On Jul 2, 3:54 pm, AD7six <[EMAIL PROTECTED]> wrote: > On Jul 2, 11:49 am, Dan Soendergaard <[EMAIL PROTECTED]> wrote: > > > > > I'm doing a simple forum which should support nested replies. So, I > > decide

Re: Set root entry in Tree Behavior and fetch children?

2008-07-02 Thread Dan Soendergaard
nk you for your help, it's greatly appreciated! On Jul 2, 2:18 pm, Adam Royle <[EMAIL PROTECTED]> wrote: > And put this in your ForumEntry model. > > var $order = 'ForumEntry.lft ASC'; > > On Jul 2, 9:00 pm, Dan Soendergaard <[EMAIL PROTECTED]> wrote: >

Re: Set root entry in Tree Behavior and fetch children?

2008-07-02 Thread Dan Soendergaard
's part of the > Model class. > > Cheers, > Adam > > On Jul 2, 7:49 pm, Dan Soendergaard <[EMAIL PROTECTED]> wrote: > > > I'm doing a simple forum which should support nested replies. So, I > > decided to use the Tree Behavior. > > > models/

Set root entry in Tree Behavior and fetch children?

2008-07-02 Thread Dan Soendergaard
I'm doing a simple forum which should support nested replies. So, I decided to use the Tree Behavior. models/forum_entry.php - - The tree in my database looks like thi

Blank line at beginning of RSS feed

2008-06-12 Thread Dan Soendergaard
line as the https://trac.cakephp.org/ticket/2761 but it should be solved a long time ago :) Suggestions are welcome! Sincerely, Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To pos

Re: Auth Component not working using PagesController

2008-05-30 Thread Dan Soendergaard
Thanks! So simple, I don't believe it... But it works :) On 29 Maj, 23:47, francky06l <[EMAIL PROTECTED]> wrote: > Did you copy the PagesController in your application ? If so, create > the beforeFilter and call parent::beforeFiler .. > hth > > On May 29, 10:47 pm

Auth Component not working using PagesController

2008-05-29 Thread Dan Soendergaard
Auth->user()); } else { $this->set('user', null); } } public function isAuthorized() { return true; } } ?> Thanks in advance :) - Dan --~--~-~--~~-

Re: Strange error about config/core.php

2008-05-21 Thread Dan Soendergaard
Turned off safe mode and now it's working. :) On 21 Maj, 16:56, Dan Soendergaard <[EMAIL PROTECTED]> wrote: > Hi, > > I changed a couple of methods in one of my controllers and suddenly > receive the following error, > > Warning: Configure::include() [configure.includ

Strange error about config/core.php

2008-05-21 Thread Dan Soendergaard
27;[EMAIL PROTECTED]'; $this->Email->from = 'sporter <[EMAIL PROTECTED]>'; $this->Email->template = 'match'; $this->set('user', $data); $this->Email->send(); } What&#

Re: Finding popular activities

2008-05-20 Thread Dan Soendergaard
); > $popularActivities = $this->Activity->find('all', array( >   'conditions' => '1=1 GROUP BY Activity.id HAVING num_users > 0', >   'order' => 'num_users DESC', >   'limit' => 10, >   'recursi

Finding popular activities

2008-05-20 Thread Dan Soendergaard
ty->find()? If yes, how do I tell it that I want the count of users for each activity? Thanks in advance :) Sincerely, Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this

Re: Class diagram (MVC)

2008-05-17 Thread Dan Soendergaard
Maybe this is what you're looking for? http://bakery.cakephp.org/articles/view/visualize-schema-task On May 17, 5:16 pm, dandreta <[EMAIL PROTECTED]> wrote: > Then, to seeing if I have understood it well. For my example, I have > two classes: > ---

Publishing iCal calendars with Cake

2008-05-17 Thread Dan Soendergaard
Hi! A school project of mine, written in Cake, contains a list of events. So far the events are accessible as RSS feeds and on the web-site, however, I thought that it would be cool to implement iCal output. First, I tried to do it using RequestHandler (which I had just learned to use yesterday)

Re: Popup color picker.

2008-05-12 Thread Dan Bair
Do you have a specific color picker in mind? There are plenty of good color pickers for JQuery and Prototype. Most of the time it's just a few lines of code to implement, so you could pop that into your own helper. http://plugins.jquery.com/search/node/Color+Picker On May 12, 9:16 pm, mustan9

Re: Is Cake 1.2 ready to use in production?

2008-05-05 Thread Dan Bair
@bittersweet I was in the same boat as you. I felt a little wary of using the beta for my client work; however, I gave in, and so far, I have had no problems and have been amazed with 1.2. On May 5, 8:35 pm, bittersweet <[EMAIL PROTECTED]> wrote: > Hi, > > It's been a year since Cake 1.2 rolled

Re: SIte Homepage loading very slowly

2008-04-17 Thread Dan Bair
Another couple things you could do to speed up your site: 1) Minify or pack your javascript files and then combine then into a single file (you could use prototaculous) 2) gzip your CSS and javascript 3) Load your javascript and css files from a subdomain (example: static.tveed.com) I've noticed

Re: Query Question

2008-04-02 Thread Dan
I figured it out $this->Game->bindModel( array('hasOne' => array( 'CategoriesGame' => array( 'className' => 'CategoriesGame' ) )),

Re: Retrieve all articles from more then one categories?

2008-04-02 Thread Dan
I think you need to use findAll not findBy $this->set('articles', $this->Category->findAll('Category', "Category.slug IN 'tutorials', 'photoshop'")); not sure of the exact syntax so the above probably doesn't work but I believe findAll is what you're looking for. --~--~-~--~~---

Re: Query Question

2008-04-02 Thread Dan
Thanks for the note but I can't get conditions to work because it's a HABTM relationship. I tried $this->paginate('Game', "Category.name = 'puzzle'"); but it gives me SQL Error: 1054: Unknown column 'Category.id' in 'where clause' The query doesn't join Category to Game so it has no idea what

Query Question

2008-04-02 Thread dan
Games HABTM Categories I need to $this->paginate('Game'); where Category.name = 'puzzle' Is this possible? Tried using bindModel but can't figure it out. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP"

Re: Changing action on the fly - by user type

2008-03-26 Thread Dan
intends to render > (I think the render() function might be the one to set that). > > On Mar 26, 9:10 am, Dan <[EMAIL PROTECTED]> wrote: > > > Hi, > > > I'd like to change the action on the fly on a per user type basis - I > > don't want to use

Changing action on the fly - by user type

2008-03-26 Thread Dan
ld become controller->usertype_index but i'm noticing that the originally view gets called and the newly modified action gets called without function parameters. I'm assuming i'm not using this as intended, but wantd to see if anyone else i

Discussion on cake-apps-sites-in-the-wild

2008-02-18 Thread Dan Bair
Adding my new site: www.choclopedia.org --~--~-~--~~~---~--~~ 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 to [

habtm or hasmany

2008-01-19 Thread dan
I thought of a different way I could do ratings, I'm pretty new to CakePHP and I'm not sure if it would be better. I have users and games. I was going to have a ratings table, users hasmany ratings and games hasmany ratings. In the ratings table I would store what they rated the game. I want to

Re: PhpGaclComponent -> Can't seem to get working...

2007-10-31 Thread Dan Ballance
$axoSection, $axoValue); } Just in case anyone else struggles with this, dan :-) On 30/10/2007, Dan Ballance <[EMAIL PROTECTED]> wrote: > > Hi folks, > > I have been scouring google and this email list for any help with this, > but no joy after several hours. Think I'm

  1   2   >