Re: ACL->allow based on aco id

2013-08-02 Thread Michael Gaiser
I have tried to pass in arrays like ("Aco"=>array("id"=>4)) but it doesn't seem to work. Any suggestions? On Thu, Aug 1, 2013 at 3:13 AM, Michael Gaiser wrote: > So I have seen a lot of examples that use the aco alias when calling > allow() but they usually

ACL->allow based on aco id

2013-08-01 Thread Michael Gaiser
So I have seen a lot of examples that use the aco alias when calling allow() but they usually have the parent aco's alias included. For example 'controllers/Users'. Is it possible to call allow() and just use the Aco.id and the Aro.id? Thanks ~Michael -- Like Us on FaceBook https://www.facebook

Re: Issues upgrading component from 1.x to 2.x

2013-06-24 Thread Michael Gaiser
isting acl base code but that means extending the class and overriding the necessary functions. On Mon, Jun 24, 2013 at 1:25 AM, Rachman Chavik wrote: > On Sun, 23 Jun 2013 01:43:28 -0400, Michael Gaiser wrote: > > > Or even, just a solid example that extends the existing AclCompo

Re: Issues upgrading component from 1.x to 2.x

2013-06-22 Thread Michael Gaiser
Or even, just a solid example that extends the existing AclComponent so that I can actually override some of the functions in it? Thanks again! On Sun, Jun 23, 2013 at 1:39 AM, Michael Gaiser wrote: > Well, the code in the link actually extends "AclComponent". Any other > ide

Re: Issues upgrading component from 1.x to 2.x

2013-06-22 Thread Michael Gaiser
Well, the code in the link actually extends "AclComponent". Any other ideas? On Sat, Jun 22, 2013 at 3:37 PM, Gaurav Matta wrote: > Check component class it should extend. Component and not object > On 22-Jun-2013 10:03 PM, "Michael Gaiser" wrote: > >> So I f

Issues upgrading component from 1.x to 2.x

2013-06-22 Thread Michael Gaiser
So I found this compoenent that I want to use as a base for some ideas I want to try, but unfortuanatly it seems to be setup for cake 1.2. I am getting errors while trying to overload funtions which really isnt my strong suit. Has anyone been able to get this to work in cake 2.x? http://bakery.ca

ACL - Group question?

2013-06-18 Thread Michael Gaiser
So, I am trying to setup a system in Cakephp 2.x where a user can be a member of multiple groups and gain access based on the what all those groups would provide. So here is my question. Right now, the ACL behavior along with a parentNode() function in my group model automatically creates an ARO en

Re: Saving session data from a view

2013-06-16 Thread Michael Gaiser
John is right. Your view should only be concerned with how the data is presented, not how it is handled / manipulated. In the end, you should be able to completely swap out your views without having to adjust your controller at all. Follow the link John gave you and read up on it. It will save you

Re: A more advanced use of ACL?

2013-04-21 Thread Michael Gaiser
I was looking around and found this page http://joykapoor.wordpress.com/2013/01/09/authcomponent-variables-in-cakephp/ It seems that you can have your own isAuthorized() function in your user model and it will call it once it determines you are a valid user. I am going to give that a shot and see

Re: A more advanced use of ACL?

2013-04-21 Thread Michael Gaiser
Small correction, I want to overload the authorize function of the auth component. On Sunday, April 21, 2013, Michael Gaiser wrote: > The Alaxos ACL Plugin is pretty cool and I will want my code to work very > similar to that when I am done, but I dont think it will do exactly what I >

Re: A more advanced use of ACL?

2013-04-20 Thread Michael Gaiser
The Alaxos ACL Plugin is pretty cool and I will want my code to work very similar to that when I am done, but I dont think it will do exactly what I want. As for just hard coding it myself, I feel that while that is still an option, every time I and up replacing a major cake component, its because

A more advanced use of ACL?

2013-04-13 Thread Michael Gaiser
I have been thinking about how I want to setup my sites permissions. Here is my concept. I have a site that will assign a basic ARO ('Standard') which has access to the standard areas. In addition to that, moderators can create custom ARO's for the members they are responsible for. When accessing a

Re: Find 'All' returns same record multiple times

2013-02-11 Thread Michael Gaiser
ls/associations-linking-models-together.html#creating-and-destroying-associations-on-the-fly > > > 2013/2/11 清水紘己 > >> You should specify event_id or so to `group` option for GROUP BY when >> using joins with multiple records. >> It is SQL matter. >> >> >> 20

Find 'All' returns same record multiple times

2013-02-10 Thread Michael Gaiser
I want to know what I can do so it only returns the event once. Thanks. So here is my find parameters. $this->Event->find('all', array( 'conditions'=>array('Location.id'=>4), 'joins'=>array( array('table' => 'characters_events', 'alias' => 'Characters', 'type' => 'inner', 'conditions' => array(

Re: Validating multiple fields problem

2013-01-29 Thread Michael Gaiser
CharactersEvent would have just been the join table in a HABTM relationship between the Character model and the Event model if it wasnt for the fact that I needed to also assign a role to that record. Thus, it got promoted into needing its own Model and now is part of a HasMany/Belongs to with the

Re: Components vs Helpers vs Utilities

2013-01-25 Thread Michael Gaiser
I am having difficulty thinking of a time when I would need the same function to be called in my model and my view. On my current project, I am also needing to manipulate my dates as I have a non standard way of saving them in the database. What I have done is manipulated them in the controller usi

Validating multiple fields problem

2013-01-25 Thread Michael Gaiser
So, I have an event model that you are able to assign people to. Some events require at least 2 people to be assigned before they are considered valid. I have two fields for the user to filling in the persons name, and a custom validation rule that accesses $this->Event->data to loop through the di

Model Validation Error Message

2013-01-18 Thread Michael Gaiser
So because of how I am dynamically creating my form inputs/save data, the standard rule validation msg isnt being displayed on the input when the save rule returns false. How do I manually trigger the msg to appear on a given input? Thanks ~Michael -- Like Us on FaceBook https://www.facebook.co

Re: Pagination of another Model

2013-01-05 Thread Michael Gaiser
I will try that out later tonight.. Thanks a lot for the quick reply. ~Michael On Sat, Jan 5, 2013 at 1:44 PM, lowpass wrote: > > ), -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are su

Pagination of another Model

2013-01-05 Thread Michael Gaiser
So I trying to build an index page for my 'Event' controller, but this controller has been setup a little differently than my other ones. All of the events share the same "Event" model, except for the feeding events which for many reasons, have their own "Feeding" model. Both tables have a "Locatio

Dynamic Div styling question

2012-11-18 Thread Michael Gaiser
So I am working on a helper which I want to dynamically set the div's size. I am using this: echo $this->Html->style(array('height' => '200px',)); But only getting this: height: 200px; Where as I want something like this: div#mycontainer{ height: 200px; } Does anyone know how to use the HTML-

Pre BC Dates?

2012-07-12 Thread Michael Gaiser
So my website will have a time line, along with dates that range before 0 AD. What would be the best way to tackle this issue? ~Michael -- 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 o

Re: SaveAll issue with nested arrays

2012-07-12 Thread Michael Gaiser
This is from the docs: "The saveAll function is just a wrapper around the saveMany and saveAssociated methods. it will inspect the data and determine what type of save it should perform. If data is formatted in a numerical indexed array, saveMany will be called, otherwise saveAssociated is used."

Re: SaveAll issue with nested arrays

2012-07-10 Thread Michael Gaiser
Yes. Events hasMany Feedings(events_feedings) & Characters (characters_events), and they belongTo the Event. On Tue, Jul 10, 2012 at 3:30 PM, Harsha M V wrote: > what are the relations of the models ? does Events hasMany with feedings > and characters ? > > > > -- > Our newest site for the comm

SaveAll issue with nested arrays

2012-07-10 Thread Michael Gaiser
When I pass this array to my saveAll function, the events get saved but the feeding and the character do not. Is there an issue with multiple levels of indexed arrays? Would I be better off trying to save them individually? array( (int) 0 => array( 'Event' => array(

Re: Paginate with associated model conditions

2012-07-08 Thread Michael Gaiser
No on knows how to solve this issue? I have a few very complicated work arounds, but every time I end up implementing such work arounds, it always comes back to the fact that I was doing it wrong originally. ~Michael On Fri, Jul 6, 2012 at 12:09 AM, Michael Gaiser wrote: > So I am having s

Paginate with associated model conditions

2012-07-05 Thread Michael Gaiser
So I am having some issues getting Paginate to recognize its associated models when handling its conditions. Some events have a location_id, but others (like the feeding event) have their location id specified in the associated model. From the Events Index page I want to do a search for all events

Re: Autocomplete field to populate a select input example?

2012-07-03 Thread Michael Gaiser
I got it working. Thanks. On Tue, Jul 3, 2012 at 12:37 AM, Борислав Събев wrote: > Hi there. > > I am assuming that you've got he autocomplete working. So what you > basically need to do is to make an ajax call to retrieve all cities in that > state once it is entered. > The ajax call should call

Autocomplete field to populate a select input example?

2012-07-02 Thread Michael Gaiser
So I have an auto-complete field where you can type in the name of a state, and once it fills in the field, I want it to show another select input which is populated by all the cities in that state. Does anyone have a link to a tutorial or example of this? It will save me having to hack it together

Error viewing ID 0

2012-06-27 Thread Michael Gaiser
So I have a Types table which has a record with an id of 0. When I try to view it, I get this error. The requested address '//types/view/0' was not found on this server. Does anyone have any ideas how to get around this? One way would be to change it to a non 0 id, but that would be a ton of reco

Contain conditions based off parents data.

2012-06-10 Thread Michael Gaiser
So I have a table called Domains which has a parent_id allowing the domains to contain a parent/child relationship, the parent being referred to as ParentDomain. For the case I am working on, the ParentDomain has a variable called chronicle_id. The condition I want to make will get all domains whe

Re: Force validation rule to run with empty fields in data set

2012-06-08 Thread Michael Gaiser
Its not in front of me at the moment, but I can mock up what I mean. array( 'Domain' => array( 'name' => 'Foo', 'parent_id' => '85' ), 'Owner' => array( 'color' => '#123456', 'clan_id' => '32' ) ) This would be valid since clan_id (character_id, coterie_id & covenant_id bei

Re: Force validation rule to run with empty fields in data set

2012-06-08 Thread Michael Gaiser
I have added the validation rule already to the model and it works when there is data supplied to it, but I still need a way to force it to run the rule even if $this->request->data is empty when saving. I need to be able to tell it to run the rule because even if that field is empty, there might b

Re: how to wirte a code search users incakephp

2012-06-08 Thread Michael Gaiser
http://book.cakephp.org/2.0/en/tutorials-and-examples.html Run through those and you should be off to a good start. -- 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: more than 1 level of belongsTo

2012-06-08 Thread Michael Gaiser
Well, you might have an issue if Bar is not properly setup to point at Xyxxy since it needs that connection to retrieve the data. I would do a find on Bar and see if it locates both Foo and Xyzzy. On Fri, Jun 8, 2012 at 12:43 PM, simo ahalshaba wrote: > u can use 3 but the request get much infor

Re: Using Helper in Model

2012-06-08 Thread Michael Gaiser
Helpers are for views, If you care wanting to call it in your model, you are doing something wrong as it does not conform to the MCV methodology. I would suggest looking into behaviors as those are traditionally used to share code between models. ~Michael On Thu, Jun 7, 2012 at 10:36 AM, ButuzG

Force validation rule to run with empty fields in data set

2012-06-08 Thread Michael Gaiser
So I need to check that at least one field out of four is being set before I will allow to save. The validation rule works great as long as you have something sent to it, but since all the option fields have an empty slot, it would be easy to pass an array with all the right bits of info for that t

Database structure question

2012-06-07 Thread Michael Gaiser
So, I have a domain model that has a parent/child relationship with itself going about 6 levels deep. Certain levels have some additional data I need to store(owner_id, chronicle_id, etc) but these values are only on the bottom most level. Is it better to have the domain table have a owner_id and a

Re: Associative model validation fails, but does not report.

2012-06-07 Thread Michael Gaiser
All the tables that involve the users modifying data are set to innoDB for the increased data integrity. I originally wasnt giving the saveAll any arguments, but tried to set 'Validate'=>'first' as I saw in one example and that didnt work either. I finally got the errors propagating back to my vie

Associative model validation fails, but does not report.

2012-06-06 Thread Michael Gaiser
So I have a form in my domains/add view. All the domain input fields save their data just fine when the form is submitted. The problem is that there is another field (Characters.0.character_id) that is to save its data to an hasMany associated join model (CharactersDomain). In the CharactersDomain

Re: custom model validation question

2012-06-06 Thread Michael Gaiser
ok. i figured it out. The models being saved can be accessed in the validation rule through $this->data. On Wed, Jun 6, 2012 at 10:29 AM, Michael Gaiser wrote: > I guess my question is: How do you get access to all the other > associated data that is being saved? I can set it up so I

Re: Looking for MVC & CakePHP Best practice doc, examples for Med to large sites

2012-06-06 Thread Michael Gaiser
Yeah, I see it now. Apologies to Bill. To be fair to Bill Michael, it was Johns responses to the initial question > that mentioned "Shitty Code" and "Shitty Data" ... I think Bill may have > been making a point in much the same way as you have :) > > -- Our newest site for the community: CakePH

Re: Looking for MVC & CakePHP Best practice doc, examples for Med to large sites

2012-06-06 Thread Michael Gaiser
Bill, you might want to avoid insulting those users who ask "shitty code questions" while in the same post asking for their help... You are looking for hangups in cakephp where your database setup will differ due to limitations with the framework. To this point, I have only experienced a direct re

Re: custom model validation question

2012-06-06 Thread Michael Gaiser
I guess my question is: How do you get access to all the other associated data that is being saved? I can set it up so I catch it before the save happens, but it feels kind of hacky and does not make use of the field error message code. -- Our newest site for the community: CakePHP Video Tutorial

Re: Question

2012-06-05 Thread Michael Gaiser
You probably are looking for something like this. Employee Name Age Hired -- 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 the

Re: custom model validation question

2012-06-05 Thread Michael Gaiser
ine. > > > On Jun 5, 2012, at 5:45 PM, Michael Gaiser wrote: > >> I have a Domain Model that has 4 "has Many" relationships with 4 >> different join models (Character, Clan, Covenant, Coterie). When >> creating a new record, the user is presented with 4 optio

Re: Question

2012-06-05 Thread Michael Gaiser
Just like any other .html file. ~Michael On Tue, Jun 5, 2012 at 9:40 PM, ying yang wrote: > My question is how i can make a table in view.ctp? > > -- > Our newest site for the community: CakePHP Video Tutorials > http://tv.cakephp.org > Check out the new CakePHP Questions site http://ask.c

custom model validation question

2012-06-05 Thread Michael Gaiser
I have a Domain Model that has 4 "has Many" relationships with 4 different join models (Character, Clan, Covenant, Coterie). When creating a new record, the user is presented with 4 option boxes, each filled with different data pertaining to the 4 associated models but defaulting to an empty option

Re: GoogleMapV3 Helper issue

2012-05-27 Thread Michael Gaiser
I got it working finally. I ended up using a different branch and it worked. Thanks Sent from my iPhone On 2012-05-26, at 9:23 PM, euromark wrote: without showing the complete code its hard to tell what you are doing wrong no - as long as you are connected to the internet you should be fine

Re: Geocoding

2012-05-26 Thread Michael Gaiser
I meant my Location Model, not Controller. On Sat, May 26, 2012 at 9:22 AM, Michael Gaiser wrote: > When is says: > > 2. Add the following to your model: > >    public $useDbConfig = 'geoNames'; >    public $useTable = false; > > > > Does that go in my L

Re: Geocoding

2012-05-26 Thread Michael Gaiser
When is says: 2. Add the following to your model: public $useDbConfig = 'geoNames'; public $useTable = false; Does that go in my Locations controller or do I make another controller? If it goes into my Locations Controller, will the line "public $useTable = false;" keep my model from a

Re: GoogleMapV3 Helper issue

2012-05-25 Thread Michael Gaiser
Would there be any issue with the fact that I am running it from my local host instead of from my host? -- 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

Re: GoogleMapV3 Helper issue

2012-05-25 Thread Michael Gaiser
Firebug shows there isn't anything being sent. Sent from my iPhone On 2012-05-25, at 4:27 AM, euromark wrote: you must be doing sth wrong. this is usually a JS error. if you use firefox and firebug extension you most likely can see the JS error in the firebug console at the bottom. Am Freitag

GoogleMapV3 Helper issue

2012-05-25 Thread Michael Gaiser
So I have been trying to get this to work but still cannot seem to work through it. I am using this version: https://github.com/dereuromark/cakephp-google-map-v3-helper And following this explanation: http://stackoverflow.com/questions/8795104/google-map-v3-cakephp-helper-and-multiple-markers Bu

Re: Comparing user's existing password

2012-05-18 Thread Michael Gaiser
Have you changed your security salt setting since you first entered in original password? If so your passwords hash will not match. Sent from my iPhone On 2012-05-18, at 8:49 AM, rahajiyev wrote: > When user enters his current password for verification it compares > unequal to his real password

Re: Finished tutorials but do not know how to proceed learning

2012-05-11 Thread Michael Gaiser
You can do any of those paths and will need to eventually. If I were you, I would make sure your database is setup right, maybe do some MySQL tutorials along the way. Everything is based off your database tables and their associations so getting those setup right will save you a lot of time down th

Re: different find results for models null values.

2012-05-08 Thread Michael Gaiser
Thanks. On Tue, May 8, 2012 at 1:39 PM, euromark wrote: > you can usually find the latter in belongsTo relations. > cake will then return the result with those values set to null. > > if you have hasMany relations (a separate query) it doesnt make sense to > return lots of empty result sets > and

different find results for models null values.

2012-05-08 Thread Michael Gaiser
So sometimes the results for my model finds seem to very between the two formats: $results['Faction'] = array() and $results['Faction'] = array('id'=>null, 'name'=>null) What determines the two? I would prefer that it always give me the listed fields with null values, but I am unsure what is g

Re: Model Associations and Inserting through Associations

2012-05-05 Thread Michael Gaiser
You should take some time to learn how to use bake. It will setup the basics for you based on your database and will serve as a great example of how to do things. http://book.cakephp.org/2.0/en/console-and-shells/code-generation-with-bake.html There are many tutorials out there about setting it u

Re: Potential Database Project using Cake PHP

2012-05-04 Thread Michael Gaiser
http://book.cakephp.org/2.0/en/index.html -- 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 unsubscribe from this group, send email to ca

HABTM Save format?

2012-05-03 Thread Michael Gaiser
I am using Cake 2.1 and have a two models, Domain & Location which use the DomainsLocation join table. In the DomainController, I have a function called AddLocation() which I want to add a record to the DomainsLocation table so that the domain knowns which locations belong to it. So here is my ques

Re: how to get id before saving

2012-05-03 Thread Michael Gaiser
I think you could also set it up as a Virtual Field since its calculated off the id and that wont change. It would also keep your table a bit smaller and not run the risk of data duplication. ~Michael -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check ou

Giving context to a select field?

2012-05-02 Thread Michael Gaiser
So, I have a Location Model that is using the tree behavior. Level 1 is Countries, their children are Regions. The Regions children are cities... So I need to give some context to the results in the select menu since there are several cities with the name "Portland" for example. Is it Portland, Ore

Re: Sort assoc data

2012-05-02 Thread Michael Gaiser
>    'fields' => array(...), >    'order' => array( >      'OtherModel.column' => 'ASC' >     ) >  ) > ) > > On Tue, May 1, 2012 at 5:55 PM, Michael Gaiser wrote: >> So, I have been able to sort queries of the basic model, bu

Sort assoc data

2012-05-01 Thread Michael Gaiser
So, I have been able to sort queries of the basic model, but how do you specify sorting paramaters for the associated models? -- 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

Google Map interface question

2012-04-29 Thread Michael Gaiser
So, I want to use Google maps on my project which makes use of a Location model. In that model there is a longitude and latitude value. Most of the tutorials I have looked at talk about how to place markers on your map. What I want to do is use the map to allow people to navigate to the location t

Re: Can you dynamically change CSS for a layout per user?

2012-04-28 Thread Michael Gaiser
Would it be possible to just put a test in your app_controller.php and then make use of it in your \View\Layouts\default.ctp file? That way all your pages get it by default and you do not need to drive yourself crazy with placing that code everywhere. ~Michael -- Our newest site for the communit

Re: Tree Behavior Issue

2012-04-27 Thread Michael Gaiser
Yep... that would cause an issue. Thanks. On Fri, Apr 27, 2012 at 9:12 PM, lowpass wrote: > public $actsAs = array('Tree'); > > Notice the lowercase s you left out. > > On Fri, Apr 27, 2012 at 7:39 PM, Michael Gaiser wrote: >> I want to use the Tree Behavior on

Tree Behavior Issue

2012-04-27 Thread Michael Gaiser
I want to use the Tree Behavior on one of my models in 2.1, but it has multiple belongsTo relationships which I think is messing it up. In my domain model I have added: public $actAs = array('Tree'); In my controller I have: public function index() { $data = $this->Domain->generateTreeList(nu

Re: Double URL in Links

2012-04-23 Thread Michael Gaiser
I was able to fix the issue by adding this to my core.php file. Configure::write('App.baseUrl', "/"); :) -- 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 rela

Re: Double URL in Links

2012-04-22 Thread Michael Gaiser
on my localhost. Any help would be greatly appreciated. Thanks. On Sun, Apr 22, 2012 at 2:05 AM, Michael Gaiser wrote: > So, I am getting this strange error. My links have the site name > listed twice in the url. > > http://www.mysite.com/mysite.com/users/view/9 > > > Now, http:

Double URL in Links

2012-04-22 Thread Michael Gaiser
So, I am getting this strange error. My links have the site name listed twice in the url. http://www.mysite.com/mysite.com/users/view/9 Now, http://www.mysite.com brings up my home page as expected, but all the links on the site have the additional layer in the name for some reason. I am running

Re: Authentication Scope error message

2012-04-21 Thread Michael Gaiser
Ok. Thanks. -- 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 unsubscribe from this group, send email to cake-php+unsubscr...@googlegroup

Authentication Scope error message

2012-04-21 Thread Michael Gaiser
So, I want to have a requirement for my users email to be confirmed before they are allowed to login. This will be represented by a "confirmed" field in my User table. I have set my Authentication scope to be array('User.confirmed' => 1) and it works as expected. My only issue now is that when the

Re: How to stop redirecting to login page

2012-04-05 Thread Michael Gaiser
I forgot to post it, but there is a call to parent::beforeFilter() as well as $this->Auth->allow('/', 'login', 'logout', 'confirm'); in the beforeFilter within the User Controller. I still cannot figure out why its automatically getting sent to the login though. -- Our newest site for the commun

How to stop redirecting to login page

2012-04-05 Thread Michael Gaiser
So, I have a login link in the corner of my homepage which I want people to click on to login... pretty simple. Problem is that I cannot seem to view my homepage as I am automatically redirected to the login page. This causes issues when you login since the login returns you to the initial page (th

Re: Failed Deployment

2012-03-08 Thread Michael Gaiser
Yeah, clearing the cache didnt work either. When I view the page source, it is completely empty. -- 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 questi

Failed Deployment

2012-03-02 Thread Michael Gaiser
So I have been working on a site for a while now on my laptop (localhost) and things pretty much worked the way I would expect. But when I tried to deploy it to my host and thats where my problems started. When I go to my site, a blank page shows up, even though the redirect to /users/login does ta

Accessing another controllers function.

2011-08-15 Thread Michael Gaiser
So I have 2 controllers. Domain, & Location. Domains have several locations. The Location controller has a function called "report" which I want to be able to call from my domain controller to generate the reports for each of its locations. I was thinking that I could just do it like this: $report

multiple views or one massive view

2011-07-23 Thread Michael Gaiser
So I am working on a site that would display characters from several different games, many of which share the same types of attributes but just call them differently. I have a variable setup to tell me which game we are currently dealing with so my question is this, do I just have the view contain

Between conditional question

2011-06-27 Thread Michael Gaiser
So I have been able to find records in my database by supplying a conditional like 'Location.id'=>'4' and it will give me the location record who's id is 4. But I am now trying to deal with dates and it has made the database calls a bit more difficult. How do I tell the find function that I only wa

setFlash issue in 1.3?

2011-05-18 Thread Michael Gaiser
This line no longer seems to output a message nor does any other use of setFlash. $this->Session->setFlash('Cookie created. It will expire '.$this->Time->niceTime($cookie['expire'])); So when I was using 1.2 my code seemed to work out ok. Since migrating to 1.3, I have made sure that Session was

Deeper User Info

2010-10-28 Thread Michael Gaiser
So I have my login working using the Auth component which returns the user data when I call $this->Auth->user. The user record is tied to a location via its domain_id. The problem I am having is that I need to have the domain name from that Id, but the Auth->user function only returns the first lev

Re: Issue getting deeper info

2010-09-30 Thread Michael Gaiser
/view/1323/Containable > > That should fix your problems easy enough. > > ~wrdevos > > On Sep 30, 4:02 am, Michael Gaiser wrote: >> Might this have anything to do with it using the tree behavior? >> On Sep 29, 2010 7:14 AM, "Michael Gaiser" wrote: >>

Re: Issue getting deeper info

2010-09-29 Thread Michael Gaiser
Might this have anything to do with it using the tree behavior? On Sep 29, 2010 7:14 AM, "Michael Gaiser" wrote: > I will also add that changing the recursive setting does not seem to work. > > ~Michael Check out the new CakePHP Questions site http://cakeqs.org and help

Re: Issue getting deeper info

2010-09-29 Thread Michael Gaiser
I will also add that changing the recursive setting does not seem to work. ~Michael Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To pos

Issue getting deeper info

2010-09-28 Thread Michael Gaiser
I am trying to get the name of the child Locations from my Domain controller. Here is the domain model: class Domain extends AppModel { var $name = 'Domain'; var $actsAs = array('Tree'); var $displayField = 'name'; var $belongsTo = array( 'ParentDomain' => array(

shared controller functions

2010-09-27 Thread Michael Gaiser
So I want to use some of the functions from my locations controller in my domains controller. I know how to load a model, which is working, but when I tried to load a controller, it didnt seem to work is there some special syntax for this? ~Michael Check out the new CakePHP Questions site http://

Need some help with a rather complex find() request

2010-09-17 Thread Michael Gaiser
So, here is the basics of my setup. - There is a table of Locations. - Each Location has a type. (0=global, 1=national, 2=regional, 3=city, 4=landmark) - Each Location has a parent_id allowing for you to chain locations. - The chain uses the type field to determine what

Re: Paginate page 2+ not working

2010-09-02 Thread Michael Gaiser
g for the first time. ~Michael On Thu, Sep 2, 2010 at 5:37 PM, Michael Gaiser wrote: > I was meaning $results didnt have any info in it. When I debug($results), > it is just an empty array. I think this has something to do with the fact > that the paginate link doesnt supply the vie

Re: Paginate page 2+ not working

2010-09-02 Thread Michael Gaiser
fter the switch > block? Perhaps also debug $this->data at the beginning of the action. > > On Thu, Sep 2, 2010 at 11:24 AM, Michael Gaiser > wrote: > > So, I have been trying to get this paginate feature working and I can get > > the first page properly, but when it re

Ajax link to update display

2010-09-02 Thread Michael Gaiser
I have a link in the confirmation column in my view that reads "No". When I click on it, ajax sends a update to the DB and adds my user Id to that record. It then should change the "No" text of the link to "Yes" without needing to refresh the page and in turn needing to pull the entire record from

Paginate page 2+ not working

2010-09-02 Thread Michael Gaiser
So, I have been trying to get this paginate feature working and I can get the first page properly, but when it returns the 2nd page, the query is empty. Anyone see anything wrong? I suspect it has something to do with the $searchStr arg but am unsure how to get around not having an arg in that func

Re: Trouble with find conditions

2010-09-02 Thread Michael Gaiser
That worked. Thanks On Sep 1, 2010 6:06 PM, "cricket" wrote: > On Wed, Sep 1, 2010 at 5:51 PM, Michael Gaiser wrote: >> The structure is currently a int(11) which can also be NULL. >> >> The command I am using is this. >> >> $results = $this->pag

Re: Trouble with find conditions

2010-09-01 Thread Michael Gaiser
r full find statement at the > moment? > > Jeremy Burns > *Class Outfit* > * > * > jeremybu...@classoutfit.com > http://www.classoutfit.com > > On 1 Sep 2010, at 16:43, Michael Gaiser wrote: > > I am trying to limit my search to all the records that do not have a > c

Trouble with find conditions

2010-09-01 Thread Michael Gaiser
I am trying to limit my search to all the records that do not have a confirmed_id assigned to them. How do you set that condition up? I have tried ' ', None, NONE, NULL, null and many others and nothing seems to work. Any suggestions? ~Michael Check out the new CakePHP Questions site http://cakeq

Online Documentation

2010-08-24 Thread Michael Gaiser
Hey guys, I know that Cake has a great online set of documentation, but the only time I really have to work on my project is on the train which unfortunately does not have internet access. Is there a copy of the online docs anywhere or do you know of a program that can crawl the cakephp.orgsite and

Auth component not returning expected array key??

2010-03-19 Thread Michael Gaiser
So I am currently trying to migrate to Cake 1.3RC2. Everything is going well, except the array that is being returned when I call $this->Auth->user(). If I am navigating to my user page, the array key is: Array ( [User] => Array ( etc..)) But when I am navigating to any of my other pages it comes

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

2010-02-24 Thread Michael Gaiser
+San Francisco Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscrib

Containable with recursion?

2009-12-22 Thread Michael Gaiser
So I have a model setup where a location can link to itself as a parent. (states and cities are all locations, San Francisco would have the California set to its parent_id). Now my issue is that I am trying to build a function that when given a location id, it will return an array of all the childr

  1   2   >