RE: Contain HABTM

2009-08-05 Thread Dave Maharaj :: WidePixels.com
Thanks, I figured it out. function __getAmenities ($id) { $params = array('conditions' = array('User.id' = $id), 'fields' = array('User.id'), 'contain' = array('Amenity' =

Slug name limitations

2009-08-04 Thread Dave Maharaj :: WidePixels.com
How would you validate a user created slug so that it is not a name used as a function in the app? (in my app they choose the slug they want...not created by first + lastname) I obviuosly do not want a user choosing a slug admin or any controller name || function? Since all of these are stored

Template help

2009-08-04 Thread Dave Maharaj :: WidePixels.com
I have created a template that has a header intro for 1 specific controller...no problem there. Now when a user views this specific template there are 3 links which load content from different controllers with ajax. contact_info experience sales When the page initially loads contact_info is

savefield question

2009-08-04 Thread Dave Maharaj :: WidePixels.com
Can you save data using a function in the model? I have a saveField but rather then checking and verifying that the person trying to save data it would be much easier to update Table.field where Table.user_id = auth-user AND Table.id = $id Is there an easy way to do this? Dave

RE: Slug name limitations

2009-08-04 Thread Dave Maharaj :: WidePixels.com
? On Aug 4, 8:49 am, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: How would you validate a user created slug so that it is not a name used as a function in the app? (in my app they choose the slug they want...not created by first + lastname) I obviuosly do not want a user choosing

Contain conditions

2009-08-02 Thread Dave Maharaj :: WidePixels.com
Just wondering if this is possible or how to go about it Site has Posts from various users Now a User can bookmark posts they like and save them, now when they view the posts/index page how can i set pagination to contain so that it does not shows posts that the user has saved. Dave

Sortable using jQuery help

2009-07-29 Thread Dave Maharaj :: WidePixels.com
Has anyone implemented the sortable feature using jQuery UI? I found this online http://stackoverflow.com/questions/955438/jquery-sortable-in-cakephp-stuck-a t-ajax-part I have the sorting part working but its not firing the ajax request to update the order. $(#sortable).sortable({

Set user variables

2009-07-28 Thread Dave Maharaj :: WidePixels.com
I have a set of variables that are used throughout the app such as $auth = $this-Auth-user('id'); $slug = $this-Auth-user('slug'); $role = $this-Auth-user('role'); and so on How can I define these in the app_controller beforeFilter so I can grab them from any controller using function

RE: Set user variables

2009-07-28 Thread Dave Maharaj :: WidePixels.com
$this-Session-read('Auth.User.id'); } If you want to access the current userId in another controller then simply call $userid = $this-userId(); HTH Cheers, tobi_one On Jul 28, 6:09 pm, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: I have a set of variables that are used throughout

Query Opinion

2009-07-26 Thread Dave Maharaj :: WidePixels.com
I am building a function that checks access permission. First check if profile is public, if not conditions from 2 other tables are checked and 1 of those conditions must be true to allow access. My question is should i just grab all the conditions needed to be checked with 1 query then compare

saveField updates more than the field

2009-07-24 Thread Dave Maharaj :: WidePixels.com
I have $this-Calculations-saveField('percent', $percent); which saves a math formula to the field But modified field is also getting updated which I do not want. Can we specify that we only want the one field saved? Or just use save() and include the fields we want to save instead of

beforeRender question

2009-07-23 Thread Dave Maharaj :: WidePixels.com
I want to check that a url/id is valid in a before render function and was wondering how to go about it. So if a user types in an address site/posts/some_id_here it will check the some_id_here against the db to see if it exists i have function beforeRender() { if

Array Help

2009-07-22 Thread Dave Maharaj :: WidePixels.com
I have this array and trying to do a for each Showcase Entry to show up with the Showcase. I just cant seem to get the Entry array for each Showcase to appear. Each Showcase apers but no Entry associated with it. [Showcase] = Array ( [0] = Array (

RE: Array Help

2009-07-22 Thread Dave Maharaj :: WidePixels.com
SELECT * FROM entries WHERE showcase_id = '6bd19a7775f'; Returns nothing because that Showcase has no Entries SELECT * FROM entries WHERE showcase_id = '5edd082b249'; Returns the 5 test entries I have added for that Showcase The correct data is being pulled I just cant get the

RE: Array Help

2009-07-22 Thread Dave Maharaj :: WidePixels.com
Maharaj :: WidePixels.com [mailto:d...@widepixels.com] Sent: July-22-09 2:20 PM To: cake-php@googlegroups.com Subject: RE: Array Help SELECT * FROM entries WHERE showcase_id = '6bd19a7775f'; Returns nothing because that Showcase has no Entries SELECT * FROM entries WHERE showcase_id = '5edd082b249

RE: Array Help

2009-07-22 Thread Dave Maharaj :: WidePixels.com
Figured it out... Stupid mistake on my part. Thanks guys. Dave -Original Message- From: Jeff Griffiths [mailto:anisotro...@gmail.com] Sent: July-22-09 2:32 PM To: cake-php@googlegroups.com Subject: Re: Array Help I'm not sure I understand. If you have this data structure in your

Find conditions

2009-07-21 Thread Dave Maharaj :: WidePixels.com
How would I find the newest entry added using the created date? 'conditions' = array( 'Entry.showcase_id' = $showcase_id, 'Entry.created' = not sure how to get the newest??/?), Thanks Dave --~--~-~--~~~---~--~~ You received this message because you

Help with JQuery and Cake

2009-07-21 Thread Dave Maharaj :: WidePixels.com
I am uploading a file and the script uses name: 'data[Image][image]', to pass the file name to Cake. What I want to do is not use the file name the user enters and change the file name before the page is submitted. I can change the file name server side but then I need to run more queries to

Cannot modify header information

2009-07-20 Thread Dave Maharaj :: WidePixels.com
I have debug = 2 and I get Cannot modify header information turn debug to 0 and it works the way i want. Doing a redirect after login to redirect a user to appropriate area. No white space after closing ? $this-Auth-autoRedirect = false; Ideas why this may be happeining? Dave

RE: Cannot modify header information

2009-07-20 Thread Dave Maharaj :: WidePixels.com
!) Ayudar nos hace felices! http://needish.com - http://helperman.org On Mon, Jul 20, 2009 at 2:54 PM, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: I have debug = 2 and I get Cannot modify header information

RE: Cannot modify header information

2009-07-20 Thread Dave Maharaj :: WidePixels.com
, Jul 20, 2009 at 3:24 PM, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: Yes. Cannot modify header information - headers already sent by (output started at /cake/basics.php:108) [CORE/cake/libs/controller/controller.php, line 640] Now what? From

CSS in Cake question

2009-07-19 Thread Dave Maharaj :: WidePixels.com
When building a css for a Cake app what is the correct way to link to images? I keep CSS images separate from site images so I have css/images Do I use background:url(/app/webroot/css/images/page_bg.jpg) top left repeat-x} or background:url/css/images/page_bg.jpg) top left repeat-x}

Ajax Upload

2009-07-17 Thread Dave Maharaj :: WidePixels.com
I am using the ajax upload from Valums http://valums.com/ajax-upload/ and have it uploading my images fine. Problem I have left to solve is I have a drop down to select an Album to save the image to. Does anyone have experience with this plug in that may halp point me in the right direction on

CakePHP and Jcrop

2009-07-16 Thread Dave Maharaj :: WidePixels.com
Has anyone implemented JCrop into a cake application? ***not interested in the jQuery Crop and Upload as in the Bakery *** So far I have upload images function which creates 1 size for the gallery and a thumbnail. Added editimage function which loads the fullsize image and the jCrop

RE: CakePHP and Jcrop

2009-07-16 Thread Dave Maharaj :: WidePixels.com
I just figured it out Was missing the save the new image function. Added; imagejpeg($dst_r, $output_filename, $jpeg_quality); in the editimage function and presto Much easier than the Bakery component Thanks Dave -Original Message- From: brian [mailto:bally.z...@gmail.com]

RE: CakePHP and Jcrop

2009-07-16 Thread Dave Maharaj :: WidePixels.com
I tried the Bakery one over and over and finally got it workingthen after a few uploads of testing I get 500 Internal Server Error...but who knows. Figured I would try it on my own and to my surprise it works perfect and with very little code. Dave -Original Message- From: brian

RE: CakePHP and Jcrop

2009-07-16 Thread Dave Maharaj :: WidePixels.com
/resources/script/uploader-plugin On Jul 16, 10:50 am, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote:  I tried the Bakery one over and over and finally got it workingthen after a few uploads of testing I get 500 Internal Server Error...but who knows. Figured I would try it on my own

Live Validation with jQuery

2009-07-14 Thread Dave Maharaj :: WidePixels.com
Does anyone know of a good client side live validation tutorial or site where there are examples of using cake / jQuery for live validation?Or a good lace to start? I found a few but they are all submit based or do not do what i need. I need to check unique and my own custom validation rules.

RE: Live Validation with jQuery

2009-07-14 Thread Dave Maharaj :: WidePixels.com
Thanks Stu, I did read thru that one but still lost on how to query the db for example for username to check if its used already. I got this one to work as close as possible http://teknoid.wordpress.com/2009/01/21/jquery-in-the-cakephp-world-part-2-i s-client-side-code-all-that-great/ But I

Message system table setup

2009-07-14 Thread Dave Maharaj :: WidePixels.com
I was curious how to approach this idea. A user can send a message to another user but how would you define the table? id user_id = person receiving from_id =person sending title message created user hasMany messages but how would you determine that both users get the message? Would you

Setting up table ID's

2009-07-13 Thread Dave Maharaj :: WidePixels.com
I am setting up am app and trying UUID for each user but question I have is: So a User.id is a UUID that User hasOne Profile.id which will be the User.id correct? User.id = same as = Profile.id And say a User hasOne Gallery which hasMany Albums and each Album hasMany Photos Would the

HABTM additional question

2009-07-13 Thread Dave Maharaj :: WidePixels.com
I have a USERS_OPTIONS HABTM table with 10 options a user can select from only and USERS_PREFERENCES with same select from only setup. Now in the form I want to add a field Other: ___ for each of the select from Options/Preferences where they could type in other options not available in

Sanitization question

2009-07-13 Thread Dave Maharaj :: WidePixels.com
I was just reading a post online about user registration and was curious about this bit function register() { if (!empty($this-data)) { $clean = new Sanitize(); $clean-clean($this-data); $this-User-set($this-data); Might be dumb of me

Confirm Password

2009-07-13 Thread Dave Maharaj :: WidePixels.com
I can not get my confirm passwords to match. I have: $this-data['User']['password_confirm'] = Security::hash($this-data['User']['password_confirm']) ; but when I debug debug($this-data['User']['password_confirm']) ; debug($this-data['User']['password']) ; both come back different even

Another password question

2009-07-13 Thread Dave Maharaj :: WidePixels.com
I have the confirm password working now, but if another field fails validation the passwords entered becomes ● ●●● in both password and confirm , meaning the user now has to re-enter the password even if there was no problem with the confirmation between the 2.

Add expiry date after created

2009-07-12 Thread Dave Maharaj :: WidePixels.com
How can I add 31 days to a date created? When saving i have $date = date(Y-m-d); $date = strtotime(date(Y-m-d, strtotime($date)) . +31 days); $this-data['Access']['expires'] = $date; but all I get is zeros The created field saves to the db as normal but I have an expires field where i

RE: Add expiry date after created

2009-07-12 Thread Dave Maharaj :: WidePixels.com
*86400)); On Jul 12, 12:49 pm, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: How can I add 31 days to a date created? When saving i have $date = date(Y-m-d); $date = strtotime(date(Y-m-d, strtotime($date)) . +31 days); $this-data['Access']['expires'] = $date; but all I get

RE: More HABTM questions - querying data

2009-07-07 Thread Dave Maharaj :: WidePixels.com
Use contain There is a chapter in the cookbook how to get only the records from related models and not pull all the un-necessary info. Dave -Original Message- From: Alastair [mailto:m...@alastairmoore.com] Sent: July-07-09 10:31 PM To: CakePHP Subject: More HABTM questions -

email function

2009-07-01 Thread Dave Maharaj :: WidePixels.com
Is there a easy way to set this up so it could be called from different controllers? Instead of putting that chunk repeated in different controllers So in a controller call the function anywhere $this-Model-Email-send($template , $subject) $this-Email-smtpOptions = array('port' = '26',

RE: return true or false

2009-06-30 Thread Dave Maharaj :: WidePixels.com
Sounds good thanks once again. Basically a user has a profile and decides if they want it public or private. But running into to many if statements and is a complete mess. Options for the profile owner public or private pretty simple But if private I have to check friendships to see if the

return true or false

2009-06-29 Thread Dave Maharaj :: WidePixels.com
I have a function that checks if a users profile is public or private function checkPublicAccess ($profile_user_id) { // check if profile is public or private //0 = private 1 = public $params = array( 'conditions' = array('Profile.user_id' = $profile_user_id,

Validate

2009-06-29 Thread Dave Maharaj :: WidePixels.com
I have created rules example: 'someRule-1' = array( 'rule' = 'alphaNumeric', 'message' = 'Only alphabets and numbers allowed', 'last' = true ), 'someRule-2' = array( 'rule' = array('minLength', '8'), 'message' = 'Minimum

RE: Validate

2009-06-29 Thread Dave Maharaj :: WidePixels.com
Just not sure how to go about it... How do I define them in app_model then relate them to each model when needed. -Original Message- From: Miles J [mailto:mileswjohn...@gmail.com] Sent: June-30-09 2:53 AM To: CakePHP Subject: Re: Validate Well yes you could apply them in app model.

ACL question

2009-06-27 Thread Dave Maharaj :: WidePixels.com
I am setting up a new app using ACL. I am using Role , user can only have 1 role so User model has: var $hasOne = array( 'Role' = array( 'className' = 'Role', 'foreignKey' = 'user_id', 'dependent' = false, 'conditions' = '', 'fields' = '', 'order' = '' ) ); function

Insert values question

2009-06-27 Thread Dave Maharaj :: WidePixels.com
Originally I had my ID's set as INT(11) but am going to try using the UUID CHAR(36) for the ID value So I have my old sql INSERT INTO `countries` (`id`, `iso`, `name`, `region`, `flag`) VALUES (1, 'AD', 'Andorra', 'Europe', 'ad'), (2, 'AE', 'United Arab Emirates', 'Middle East',

ACO / ARO

2009-06-26 Thread Dave Maharaj :: WidePixels.com
If using UUID's as primary key do I then have to edit foreign_key in AROS table to CHAR(36)? What about other fields in ACOS / AROS / AROS_ACOS? Thanks Dave --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Forms and saveAll

2009-06-25 Thread Dave Maharaj :: WidePixels.com
Just a question about figuring out how to aproach this situation. If you think of a resume you may have more than 1 education / work history...so on User hasMany educations so in the case of a resume how could you create 1 form that would load all of the users educations they have created? So

Toggle question..

2009-06-25 Thread Dave Maharaj :: WidePixels.com
I am using jQuery and maybe just a simple quetion. I load form into a div replaceing the content thats there with a form that will be updating the content . So click here to edit your profile - profile info fades out - form loads inplace...all good and simple Now cancel how can if a

Using UUId

2009-06-25 Thread Dave Maharaj :: WidePixels.com
Just wondering what fields you should user UUID for? User id - yes but what about HABTM tables? and hasMany id - would you make this a UUID post_id - is the post created usinga UUID tag_id - and the tag? 1,2,3,4 ID or xxx-xx--xxx Dave --~--~-~--~~~---~--~~

Views by Groups

2009-06-25 Thread Dave Maharaj :: WidePixels.com
I have 3 groups and each has a different view for each page. What's the easiest way to have different views for each group? Example Profile will be different for each group, the layouts will not change so much but the content displayed, is there an easy way rather than in the controller if

Sorting

2009-06-23 Thread Dave Maharaj :: WidePixels.com
I am thinking of adding a drag/sort setup using jQuery UISortable feature. I want to add this to my images_controller / image model User hasMany entries Right now my images table is id, user_id image What would i need to the table to get the save order? Simply add order field and have

RE: Array Help

2009-06-22 Thread Dave Maharaj :: WidePixels.com
Thanks... Works like a charm! Had to change it to: $combined = array(); foreach ($id as $key=$value) { $combined[$key] = array('id'=$value , 'percent'=$percent[$key]); }

Order by question

2009-06-22 Thread Dave Maharaj :: WidePixels.com
I have an array which I have re-ordered to meet the sites needs after a find so it now looks like this: Simply page Id's Array ( [0] = 4 [1] = 52 [2] = 50 [3] = 48 [4] = 43 [5] = 41 [6] = 38 [7] = 36 [8] = 16 [9] = 47 [10] = 46 [11] = 37 [12] =

Makes no sense

2009-06-22 Thread Dave Maharaj :: WidePixels.com
I am doing 2 things to an array: combine 2 single arrays into one array matching up the keysworks perfect then sort the combined array based on the percent $combined = Set::sort($combined, '{n}.percent', 'DESC'); then extracting id in the sorted order from the combined array before

RE: Makes no sense

2009-06-22 Thread Dave Maharaj :: WidePixels.com
I actually added the percent to the db, but even though it works its not the best solution as this is a search function so a user searches and the results each get a percent inserted into the dbbut that seems like a lot of overhead for the db...constantly updating the percent field every time

Array Help

2009-06-21 Thread Dave Maharaj :: WidePixels.com
How can I edit this array: Array ( [Test] = Array ( [Post] = Array ( [0] = 3 [1] = 4 [2] = 5 [3] = 6 [4] = 7 [5] = 8

RE: Array Help

2009-06-21 Thread Dave Maharaj :: WidePixels.com
From: mike karthauser [mailto:mi...@brightstorm.co.uk] Sent: June-21-09 10:08 AM To: cake-php@googlegroups.com Subject: Re: Array Help hi dave On 21 Jun 2009, at 13:35, Dave Maharaj :: WidePixels.com wrote: How can I edit this array: Array

Paginate by way other than field

2009-06-21 Thread Dave Maharaj :: WidePixels.com
Is there a way to set a pagination order by something that does not exist in a the database? I have a $percent variable that ranks search requests so each Post is given a matching percentage and I want to then order the Posts by ranking percentage highest to lowest. How do I order the Posts by

RE: Array Help

2009-06-21 Thread Dave Maharaj :: WidePixels.com
[percent] = 23 ) ) Thanks, Dave -Original Message- From: mike karthauser [mailto:mi...@brightstorm.co.uk] Sent: June-21-09 10:08 AM To: cake-php@googlegroups.com Subject: Re: Array Help hi dave On 21 Jun 2009, at 13:35, Dave Maharaj

foreach question

2009-06-21 Thread Dave Maharaj :: WidePixels.com
I have my final array but having a prblem going thru foreach with it. Array ( [0] = Array ( [0] = 52 [1] = 67 ) [1] = Array ( [0] = 43 [1] = 67 ) [2] = Array ( [0] = 40

RE: foreach question

2009-06-21 Thread Dave Maharaj :: WidePixels.com
Sorry1 final thing. How do I set pagination with this array also? Array ( [Final] = Array ( [0] = Array ( [0] = 52 - this is the Post ID [1] = 48 ) [1] = Array (

Percentage Match

2009-06-20 Thread Dave Maharaj :: WidePixels.com
I am running a search query on HABTM tables, user can select as many options as search criteria which returns and Post with the selected items. If a user select 5 options as criteria and: 1 Post has all 5 2nd Post found has 4/5 matches 3rd Post has 2/5 How could i count the matches /

Get info from ID

2009-06-20 Thread Dave Maharaj :: WidePixels.com
I have a query which produces an array to pass to paginate from a search function, so below would be the id's of the pages to display. But I need to get info from each of these pages before sending to Paginate as i want to sort them based on search criteria. How would I get information from

Pagination Help

2009-06-20 Thread Dave Maharaj :: WidePixels.com
How can I add this into the pagination? In the controller: foreach ($posts as $findMatches) { $q = $this-Post-find('first', array( 'conditions' = array('Post.id' = $findMatches), 'fields' = array( 'Post.id'), 'contain' = array(

Pagiate contain

2009-06-19 Thread Dave Maharaj :: WidePixels.com
I have a search function built based off the hoc_joins tutorial by Nate inthe Bakery. Now the search runs fine searching thru 2 associated HABTM tables matching up items the user selects. My last line is : $data = $this-paginate('Post', array('Post.id' = $posts)); but that is pulling model

RE: Pagiate contain

2009-06-19 Thread Dave Maharaj :: WidePixels.com
Sorry to bother. got it after all. var $paginate = array( 'limit' =10, 'contain' = array(... . . ))) ); Dave _ From: Dave Maharaj :: WidePixels.com [mailto:d...@widepixels.com] Sent: June-19-09 9:55 AM To: cake-php@googlegroups.com Subject: Pagiate

Help With Join

2009-06-19 Thread Dave Maharaj :: WidePixels.com
I have a search query thats throwing a 1054: Unknown column ' Program.id' in 'on clause' This is the query : SELECT DISTINCT (`Job`.`id`) as id FROM `jobs` AS `Job` inner JOIN jobs_programs AS `JobsProgram` ON (`JobsProgram`.`job_id` = `Job`.`id`) inner JOIN programs AS `Program` ON

RE: Slug instead of ID

2009-06-18 Thread Dave Maharaj :: WidePixels.com
Sorry I may not have been clear. The page URL is site/slug/controller/update But the html for the form is action=users/update/5 - primary User.id This is what I do not want...exposing the Primary ID. Dave -Original Message- From: Miles J [mailto:mileswjohn...@gmail.com] Sent:

Multiple Get Requests

2009-06-18 Thread Dave Maharaj :: WidePixels.com
Anyone know why when making a request, I inspect the activity with firebug and the 1 request returns 6 GET requests. The requests are identical...i added rand () to the end of the link and all 6 GET requests are exact. I have a link which when clicked loads a form into a div. that 1 action sends

RE: Form help

2009-06-17 Thread Dave Maharaj :: WidePixels.com
Perfect! The id = my_names_here did the trick. Thanks. Dave -Original Message- From: Marcelo Andrade [mailto:mfandr...@gmail.com] Sent: June-17-09 9:07 AM To: cake-php@googlegroups.com Subject: Re: Form help On Tue, Jun 16, 2009 at 4:10 PM, Dave Maharaj ::

RE: Slug instead of ID

2009-06-17 Thread Dave Maharaj :: WidePixels.com
a username, or even the user's name itself. On Jun 17, 7:24 am, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: I am using custom slugs that the user creates when they sign up. USER: id slug . When a User makes an entry / post or other actions on the site everything is tied

RE: Slug instead of ID

2009-06-17 Thread Dave Maharaj :: WidePixels.com
Yep...everything in the database is related by ID and model relationship is all ID. Slug is only for URL. But when updating a profile the action is site/controller/action/id exposing the ID. I would like to keep that hidden and only show the slug. Is there away for that? -Original

RE: HABTM additional fields in join table

2009-06-17 Thread Dave Maharaj :: WidePixels.com
I was wondering too about additional fields. For example I have skills Table id, Name users Table: id .. users_skills id skill_id user_id I would like to add 'years' to the join table so the user can select their Skill and years of experience with that skill. Skills table is

Image Upload

2009-06-17 Thread Dave Maharaj :: WidePixels.com
OK ihave tried this 3 times and everytime i do I get 500 Internal Server Error I then have to delete everything from the server and re-upload everything to get the site to work again. Following the tutorial here: http://bakery.cakephp.org/articles/view/jquery-image-upload-crop Followed step by

Form help

2009-06-16 Thread Dave Maharaj :: WidePixels.com
I have ?php echo $form-create($model, array('type' = 'post', 'action' = '/update')); ? which renders form id=settings/updateForm action=/settings/update method=post Is there a way to get it to look like this? form id=settings_updateForm action=update method=post Dave

Slug instead of ID

2009-06-16 Thread Dave Maharaj :: WidePixels.com
I am using custom slugs that the user creates when they sign up. USER: id slug . When a User makes an entry / post or other actions on the site everything is tied to the slug in the URL and in the controller get the Auth-ID of the user for that slug as that's the foreign key ID,

RE: Form help

2009-06-16 Thread Dave Maharaj :: WidePixels.com
...@gmail.com] Sent: June-16-09 6:04 PM To: CakePHP Subject: Re: Form help ?php echo $form-create($model, array('type' = 'post', 'url' = '/update')); ? On Jun 16, 12:10 pm, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: I have ?php echo $form-create($model, array('type' = 'post',  'action

Best approach?

2009-06-13 Thread Dave Maharaj :: WidePixels.com
I have an auth / acl setup and I want to set up where a user can select if they want their profile to be public or private. Public : anyone can view even if not logged into the site Private: must be logged in and permission check (like Hi5 or facebook) So whats the ideal way to approch

RE: Relationship question

2009-06-12 Thread Dave Maharaj :: WidePixels.com
relationship, except that it is not mandatory! John On Jun 11, 5:03 pm, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: Right. Thanks for that. So to make this work with the relations you out lined below if I add employee_id to the posts table , creates employees tables

500 Internal Server Error

2009-06-12 Thread Dave Maharaj :: WidePixels.com
Now for some unknown reason I am getting 500 Internal Server Error and can not access any part of the site. I have other sites on the server and they are still running fine so that's not the problem It's a site that has been in the works for a while and is close to being finished. - Htaccess

RE: Multiple Checkbox Validation help

2009-06-12 Thread Dave Maharaj :: WidePixels.com
are not from the database, then you have to specify them manually in the validate array, not a good solution! Enjoy, John On Jun 11, 9:37 pm, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: I am trying to validate multiple checkboxes of a HABTM table. I managed to validate the values

RE: Relationship question

2009-06-11 Thread Dave Maharaj :: WidePixels.com
, is that the foreignkey then is at the Investor end, which I assume is not the case, but maybe you can clarify that? Enjoy, John On Jun 10, 7:00 pm, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: I want to add to an app a new function. Basically I have Investors that hasMany Posts

Extract help

2009-06-11 Thread Dave Maharaj :: WidePixels.com
I am using the Wizard component and validating HABTM but the Wizard spits out an array like this: debug($this-data); [Certification] = Array ( [Certification] = Array ( [Certification] = Array (

RE: Extract help - Possible solution?

2009-06-11 Thread Dave Maharaj :: WidePixels.com
now. But is there a cleaner way to do this based on the code above? -Original Message- From: Dave Maharaj :: WidePixels.com [mailto:d...@widepixels.com] Sent: June-11-09 1:32 PM To: cake-php@googlegroups.com Subject: Extract help I am using the Wizard component and validating HABTM

Weird Form

2009-06-11 Thread Dave Maharaj :: WidePixels.com
I have a form and for some reason the names are all wacked. (Using Wizard Component) view the rendered HTML and see name=data[Certification][Certification][Certification][] but its not for Programs..they show up fine. Code for the form is below and HTML below that. Ideas why this is happening?

Multiple Checkbox Validation help

2009-06-11 Thread Dave Maharaj :: WidePixels.com
I am trying to validate multiple checkboxes of a HABTM table. I managed to validate the values but cannot get a message to display. I have my own compare values in db against submitted data to validate but no message appears I then see in the cookbook var $validate = array(

Relationship question

2009-06-10 Thread Dave Maharaj :: WidePixels.com
I want to add to an app a new function. Basically I have Investors that hasMany Posts. Nothing crazy there Now I want to add Employees that belongTo Investors so an Investor company can if they choose add employees to manage different Posts . So if an Investor company has 35 Posts they can

Wizard Component Validation

2009-06-10 Thread Dave Maharaj :: WidePixels.com
I am running into a problem validating the Wizard data before going to the next step. I have an Investor Controller (Investor controller contains the wizard) where they are adding a Listing. The Listing its self HABTM tables but its not validating them. I have validation set up and tested and

ajax controller

2009-06-09 Thread Dave Maharaj :: WidePixels.com
Just thinking about putting all my ajax functions into 1 controller but what would it be called? Ajax Ajaxs? What is the best way to do something like this? ?php class AjaxController extends AppController { var $name = 'Ajax'; var $helpers = array('Html', 'Form'); var

CSS

2009-06-09 Thread Dave Maharaj :: WidePixels.com
Can you include CSS per view as you do js? I need sifr css on only 1 view. Is there a way to include it in the specific view? Dave --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this

getInsertID();

2009-06-09 Thread Dave Maharaj :: WidePixels.com
I am trying to get the ID of the last record inserted with $last_id = $this-Applicant-getInsertID(); debug($last_id); But nothing What am I missing? Dave --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Select random records

2009-06-09 Thread Dave Maharaj :: WidePixels.com
I am generating Post by the author as a side module in the Post View. Problem is its displaying the same 5 over and over. For testing I added 50 Posts by 1 author but how can I select 5 random posts rather than now where its displaying the first 5 it finds. Dave

RE: Select random records - SOLVED

2009-06-09 Thread Dave Maharaj :: WidePixels.com
Sorry for the silly question 'order' = 'rand()', _ From: Dave Maharaj :: WidePixels.com [mailto:d...@widepixels.com] Sent: June-09-09 11:57 PM To: cake-php@googlegroups.com Subject: Select random records I am generating Post by the author as a side module in the Post View

Wizard Component and Routes

2009-06-09 Thread Dave Maharaj :: WidePixels.com
Having a go at the Wizard component...only issue I have is routing it. The routes they have defined will not work in my setup. They have Router::connect('/signup', array('controller' = 'signup', 'action' = 'wizard')); I need to modify that into:

RE: Find similar

2009-06-08 Thread Dave Maharaj :: WidePixels.com
Cool! Thanks looks good. I have modified it a bit to suit my needs but 1 question not so much related... My results returns the same post sometimes 2 or 3 times in the array. If I am viewing a post tagged with TagA TagB TagC it will return PostA 2 times if it was tagged with TagA and TagB

RE: Find similar - SOLVED

2009-06-08 Thread Dave Maharaj :: WidePixels.com
Never mind...i figured it out. Thanks. Dave -Original Message- From: Dave Maharaj :: WidePixels.com [mailto:d...@widepixels.com] Sent: June-08-09 3:30 PM To: cake-php@googlegroups.com Subject: RE: Find similar Cool! Thanks looks good. I have modified it a bit to suit my needs but 1

RE: Find similar - SOLVED

2009-06-08 Thread Dave Maharaj :: WidePixels.com
On Jun 9, 2:16 am, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: Never mind...i figured it out. Thanks. Dave -Original Message- From: Dave Maharaj :: WidePixels.com [mailto:d...@widepixels.com] Sent: June-08-09 3:30 PM To: cake-php@googlegroups.com Subject: RE: Find

RE: Limit characters?

2009-06-07 Thread Dave Maharaj :: WidePixels.com
: Limit characters? In your select you can do something like this: [code] $this-Model-find('xxx', array( fields = 'substr(description, 0, 50)', ... [/code] On Jun 6, 1:20 pm, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: Can cake limit the return on characters in a query? I have

Find similar

2009-06-07 Thread Dave Maharaj :: WidePixels.com
Wondering where to start on something like this. Post HABTM Tags Viewing a Post it may be tagged with environament' , earth , eco. I want to add to the Post view a Related Posts section so how do I get Posts that were also tagged with all or any of the tags environament' , earth , eco.

RE: Limit characters?

2009-06-07 Thread Dave Maharaj :: WidePixels.com
Message- From: Miles J [mailto:mileswjohn...@gmail.com] Sent: June-07-09 5:34 PM To: CakePHP Subject: Re: Limit characters? It has to be capitalized. On Jun 7, 11:03 am, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: Nopeno go I have 'Post' = array('fields' =array('Post.title

<    1   2   3   4   5   6   >