Detect a nude image

2012-05-28 Thread Marcus James
Hi All, I know this is not related to cakePHP but was wondering if there is any script or code that can help me find if an image is a nude image or not. Thanks, Marcus -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions

Re: Detect a nude image

2012-05-28 Thread Steve Found
On 28/05/12 11:39, Marcus James wrote: Hi All, I know this is not related to cakePHP but was wondering if there is any script or code that can help me find if an image is a nude image or not. Thanks, Marcus -- Our newest site for the community: CakePHP Video Tutorials

Re: Naming conventions: how should I do this?

2012-05-28 Thread Mike Griffin
On Sun, May 27, 2012 at 10:21 PM, Jacob Brunson juh...@gmail.com wrote: Add User (so an admin can create a new user) List Users (the admin can see all registered users) Add Item (the admin can add an 'item' to the database) I am very unsure of what to name my Model, Controller, and Views.

Re: Saving a long list of hasMany Through associasions

2012-05-28 Thread Rob M
It sounds like a HABTM table is precisely what you need. Please elaborate on your requirement 'cannot do HABTM due to storing meta info'. - Rob On Friday, May 25, 2012 9:09:59 PM UTC-4, Benjamin Allison wrote: I have two models: Users and Surveys. In my Users index view, each User row has

Re: Saving a long list of hasMany Through associasions

2012-05-28 Thread Benjamin Allison
Oh. Well I had a HABTM setup originally, but I need to store additional information with the associations – so not just user_id and survey_id, but additional fields (date_assigned, survey_priority). As far as I know, you're not allowed to add columns to the HABTM join table. That's why I

Re: Naming conventions: how should I do this?

2012-05-28 Thread Rusty
@Jacob, One other thing to consider is using the built-in routes for admin functions so that you would have a users and an items controller (plus the associated models and views) and then within the controller you would have a couple of extra functions that were admin_add (user), admin_add

error code from delete or beforeDelete?

2012-05-28 Thread bs28723
This has got to be a newbie question. I have searched, but can't seem to find an answer. Is there a way to get an error code for why the delete or beforeDelete failed and have this passed back to the Controller instead of just false? using the

Re: Saving a long list of hasMany Through associasions

2012-05-28 Thread Steve Found
On 28/05/12 14:41, Benjamin Allison wrote: Oh. Well I had a HABTM setup originally, but I need to store additional information with the associations – so not just user_id and survey_id, but additional fields (date_assigned, survey_priority). As far as I know, you're not allowed to add columns

Re: error code from delete or beforeDelete?

2012-05-28 Thread Steve Found
beforeDelete() in a model is, as I understand it, intended to do a sanity check of the database to ensure that it is safe to do the deletion. In the example, 'product_category_id' is a foreign key in the products table which indexes the category you are about to delete. This would cause a

Re: Empty array on Model::save bypasses validation

2012-05-28 Thread John
Same on 2.1.3 I can fix it by checking for an empty array on model or controller but I I guess this is not expected behavior, should I add a ticket on it? On Sunday, May 27, 2012 6:45:08 PM UTC+3, John wrote: On 2.1 if I do $this-Category-save($this-request-data) and $this- request-data is

find birthday ignoring the year

2012-05-28 Thread rockbust
Hello I am trying to find upcoming birthdays for users. within next 30 days, 30-90 days, 90-120 days , etc I do not need the year to be compaired. The birthdate field is Y-m-d format. in my model I have the following but I do not need the year to be checked so what I have does not work. I have

Re: Saving a long list of hasMany Through associasions

2012-05-28 Thread Benjamin Allison
Ah. I just got disuaded because of this portion of the Cook Book: It is sometimes desirable to store additional data with a many to many association. Consider the following *Student hasAndBelongsToMany Course* *Course hasAndBelongsToMany Student* In other words, a Student can take many

CakePHP and TinyMCE

2012-05-28 Thread damia...@gmail.com
Hi I've big problem. I want integrate TinyMCE with Cake 2.1. I use this tutorial http://bakery.cakephp.org/articles/galitul/2012/04/11/helper_tinymce_for_cakephp_2 but not working. JS add to textarea id but i see only empty textarea. What is wrong? Thanks for help. -- Our newest site for the

How I can edit a user without changing the password?

2012-05-28 Thread lsri8088
Hello, I'm using cake 2.1 with AuthComponent and standard data modelusers. How I can edit a user without changing the password? For example, add a check I want to change the password. If thischeck is true then I make a hash of the password and keep it inserted.Otherwise I do not modify the

Re: error code from delete or beforeDelete?

2012-05-28 Thread stork
Throw OutOfBoundsException somewhere and catch it from outside, or create your own exception http://book.cakephp.org/2.0/en/development/exceptions.html#creating-your-own-application-exceptions Also, read better beforeDelete() callback for your example: public function beforeDelete($cascade =

Re: How I can edit a user without changing the password?

2012-05-28 Thread Richard Joo
I am sure there are a lot better solutions than this, and more brilliant coders can help you out, but at least this is what I did. I used password and password2 (or reEnterPassword however your call it) on edit.ctp and use two different rules from the User model on Model, you will need public

Re: CakePHP and TinyMCE

2012-05-28 Thread Richard Joo
not clear without looking at all the codes, but I am wondering if Javascript Helper is loaded or not, and if you added writeToBuffer or not... On Mon, May 28, 2012 at 8:29 AM, damia...@gmail.com damia...@gmail.comwrote: Hi I've big problem. I want integrate TinyMCE with Cake 2.1. I use this

Re: Empty array on Model::save bypasses validation

2012-05-28 Thread majna
add 'required' =true http://book.cakephp.org/2.0/en/models/data-validation.html#required On Monday, May 28, 2012 7:23:35 PM UTC+2, John wrote: Same on 2.1.3 I can fix it by checking for an empty array on model or controller but I I guess this is not expected behavior, should I add a ticket

Re: Saving a long list of hasMany Through associasions

2012-05-28 Thread Ratty
On Monday, 28 May 2012 20:14:05 UTC+1, Benjamin Allison wrote: Ah. I just got disuaded because of this portion of the Cook Book: It is sometimes desirable to store additional data with a many to many association. Consider the following *Student hasAndBelongsToMany Course* *Course

Re: Saving a long list of hasMany Through associasions

2012-05-28 Thread Ratty
On Monday, 28 May 2012 20:14:05 UTC+1, Benjamin Allison wrote: Ah. I just got disuaded because of this portion of the Cook Book: It is sometimes desirable to store additional data with a many to many association. Consider the following *Student hasAndBelongsToMany Course* *Course

Twig Templates

2012-05-28 Thread #2Will
Hello I have been trying out twig templates. I was pretty sceptical at first but we are doing an app where it would be great if the templates where auto escaped and the syntax keeps everything much more tidy which is nice. Anyway, I have only had partial success. Grahams plugin seems really

Re: Twig Templates

2012-05-28 Thread #2Will
oh, the plugin is this one: https://github.com/predominant/TwigView -- 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

Re: Empty array on Model::save bypasses validation

2012-05-28 Thread John
Oooops, stupid me, I had never run on that problem before so I didn't cross my mind it was THAT simple :-) Thanks On Monday, May 28, 2012 11:42:00 PM UTC+3, majna wrote: add 'required' =true http://book.cakephp.org/2.0/en/models/data-validation.html#required On Monday, May 28, 2012

Re: A collection of Coda clips for CakePHP

2012-05-28 Thread #2Will
Hey dude. Thanks for these. Really helpful starting point. I have added a few in as i go of some stuff i can never remember. On Saturday, 30 May 2009 11:35:08 UTC+10, DanielMedia wrote: Hi All, Just wanted to drop in and let anyone know who might be interested (And uses the Coda

Re: error code from delete or beforeDelete?

2012-05-28 Thread bs28723
I need to do more reading on Exceptions, but my case seems more like a flash message than throwing an exception. Maybe I need to do more checking in the controller, rather than using beforeDelete. This way, upon entry into delete method, I could check