Data type of the id field is int, with a length of 11. I have not hit
max. If I run a php sql insert like the following it works fine
//manually add the data
mysql_query(INSERT INTO users (username, password,
email)
VALUES
It appears that the problem is related to David Persson's media
plugin. https://github.com/davidpersson/media
In my model I commented out the call to his plugin and I can again add
a user
Previous code
var $actsAs = array('Containable','Media.Transfer',
'Media.Coupler','Media.Generator');
New
I've had a user signup working on my site for over a year and all of a
sudden its not working. I'm running cakephp 1.3 and my model and
controller are posted here for your review http://pastie.org/1919212
So here is the problem. When a new user goes to sign up the function
runs and the user gets
It looks like the problem is in this line $this-Drink-
make($file); // generate versions
When I set my file upload to $this-data['media'] by stating $this-
data['media'] = $_FILES['media'] ;
The media plugin then handles the upload using $file = $this-Drink-
transfer($this-data['media']); //
The XHR file upload using PHP to move my file to a set location and
save it works well. Really easy as I described earlier, no work around
needed. The phone app simply bypasses the view (its there but is a
blank file) and the action is handled by the controller. Again the
issue is trying to use
I kicked this around for a few days and I still cant make it work.
My model is Recipe and it is using the plugin
var $actsAs = array('Media.Transfer', 'Media.Generator',
'Media.Coupler');
When I upload using a form everything is perfect.
From my app, I'm sending the photo (via XHR) to this
to get the media plugin to handle your files, I'm
assuming you have nothing in your view and basically submitting to
your controller? I also need to return the file name of the processed
image file (looks like David explained that).
Thanks
-Foroct
--
Our newest site for the community: CakePHP
The only thing keeping me from using MediaPlugin in my app_photo()
function is that I don't know how (that's what I'm trying to find
out).
I could return the image.id or the file name as an echo or a JSON
response, it is being propegated through the submission stages
currently.
So, how would I
post it to a URL handled by a controller implementing the uploader,
This is what I don't know how to do. Currently the controller is
handling the upload and just placing the file into a folder.
My code.
function app_photo() {
// what layout to use
at 1:42 PM, Foroct forrestfraz...@gmail.com wrote:
post it to a URL handled by a controller implementing the uploader,
This is what I don't know how to do. Currently the controller is
handling the upload and just placing the file into a folder.
You said earlier that image processing is being
I have a site where a user can upload some text and an image. The
image processing is being handled using the Media Plugin by David
Persson. When a user submits a form with an image attached the image
gets crunched to multiple sizes and put in the correct folder.
For my iphone app I have a
I am trying to push content to my cakePHP site from an iphone app
using json. I've been successful when pushing text (like adding a new
user) but I an trying to push text and an image. The problem I am
having is I don't know how to include an enctype of “multipart/form-
data” within the
I'm upgrading to the latest version of David Persson's media plugin.
Its working but with this version when I attach an image file the
dirname field in my DB gets populated with img and my filtered
images end up in /media/filter/size/img/ (where size=s,m or l)
What I would like is for the
Moxby,
That is what I thought too but it isn't working. I am wondering if
after the plugin verifies a user from a social site and returns the
user to my site do I then need to add some sort of function to have
the plugin check if the user is in the table then either run the
gigyaCreateUser
I was wondering if anyone here has had experience getting Nick Bakers
CakePHP-Gigya plugin to work properly ?
http://github.com/webtechnick/CakePHP-Gigya-Plugin
I've contacted Nick but he is too busy to help at this time. I was
able to get it running to the point where a user can click a social
Hi all,
I am using David Persson's Media behavior (along with the Transfer
behavior) http://wiki.github.com/davidpersson/media/media-behavior so
a user can upload photos to my site and they will then be saved out in
different sizes. While this is working I am having an issue getting
them to save
Well it looks like this behaviour can't successfully index two
different models. Moving back to an old fashioned 'find'.
Thanks all.
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
All three models have the same $actAs array var $actsAs =
array('Searchable');
Each model saves its data properly using if ($this-Model-save($this-
data)) {
Where it falls apart is after the model data save and prior to the
search_index save.
I have tracked the issue down to something in my
I thought so after I wrote it out, but when I removed the hasOne
association I still get the same result. For some reason when I
create a post, the post gets added with no problem but the seachable
fails and kicks an error.
Query: INSERT INTO `search_index` (`model`, `association_key`, `data`,
I've looked at the array I am passing when the post gets entered and
its fine. I am saving correctly using $this-Post and the post data
saves to the post table fine.
My models look like this.
User
var $actsAs = array('Searchable' = array(
'fields' = array('username',
Continuing to work on this I have found that when I comment out my
var $hasMany = array( in my User model, then this searchable plugin
works fine.
I tried to comment out the individual keys for this array but that
did not help. When I remove the hasMany array then I am able to
successfully add
Not sure if this is what you are looking for but I show the username
and logout link by creating an if statment with isAuthed
So
? if ($isAuthed): ?
show user name and show log out link
? else: ?
show log in link
? endif; ?
hope that helps
Check out the new CakePHP Questions site
I am continuing to work on this as I want more than one model on my
site searchable.
It looks like the problem is occurring in the Searchable Behavior
setup function.
function setup($model, $settings = array()) {
$settings = array_merge($this-_defaults, $settings);
I'm a bit of a n00b but I would suggest you look at the cakephp blog
tutorial http://book.cakephp.org/view/219/Blog as it might help you.
Also a subject title that doesn't defame cake programmers might help
your cause.
Check out the new CakePHP Questions site http://cakeqs.org and help others
I am using this behavior (http://code.google.com/p/searchable-
behaviour-for-cakephp/) on two different models (User and Post).
Searchable is working fine when I add a new user and search for a
user. I manually populated a few rows of Post data and my search for
a post function works fine.
I'm still having this same issue. Can I call two behaviors in the
$actAs declaration? If so am I doing it correctly? And finally if I
am is there a way to determine why the behaviors are clashing?
Thanks!
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their
Thanks John!
While your example didn't exactly work it did help me figure out what
to do.
function addfriend($id = null) {
if (!empty($this-data)) {
// set user id
$this-data['user_id'] = $this-Auth-user('id');
Bump- Can anyone provide some insight on this?
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
John,
Wouldn't that save my data to my users table and not my users_users
table? The users_users table is where the friendships are kept.
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
I am trying to build a simple social network type site where a user
can friend another user. I realize this has been discussed before, a
lot, but none of the discussions on here really point out my issue so
I thought someone might be able to shine some light on where I am
going astray.
My user
));
}
}
On Jan 7, 9:20 pm, Foroct forrestfraz...@gmail.com wrote:
I have a users table and would like to view my users by username with
a url like example.com/users/view/username
In order to do that I have set my view function in my users controller
to
function view($username
I have a users table and would like to view my users by username with
a url like example.com/users/view/username
In order to do that I have set my view function in my users controller
to
function view($username) {
if (!$username) {
I am using two common behaviors in my cakePHP project, Sluggable
(http://bakery.cakephp.org/articles/view/sluggable-behavior) and
Searchable (http://code.google.com/p/searchable-behaviour-for-
cakephp/). Both of these work fine by themselves but when I try to
use them both in a model by calling
is a
good read anyway) and refer to page 20.
On Dec 17, 8:00 pm, Foroct forrestfraz...@gmail.com wrote:
I am working on my first cakePHP site and came across an issue I cant
quite figure out. I have a registration form that a user fills out to
become a member. I want to capture the time
I'm in the same boat as Dewayne.
If you are on the edit page for that product and click submit doesnt
the product id get passed into the controller? If so then the
redirect specified
$this-redirect(array('controller' = 'compatibles', 'action' =
'index',
'product_id' = $product_id));
should put
I am working on my first cakePHP site and came across an issue I cant
quite figure out. I have a registration form that a user fills out to
become a member. I want to capture the time they fill out the form so
I added a date_added field in my database. In the form the field
would normally be
36 matches
Mail list logo