I have a customized wordpress site with the latest version of buddypress 22.214.171.124.
My issue i sthat when users should crop their avatar they see two images but no function wordking.
My site (still under development) is [[LINK href="http://crosswide.asia"]]http://crosswide.asia[[/LINK]]
My GD library is installed
I have tried to disable all plugins without success
I have spent two days on this without success. I have limited knowledge so the fix should be easy to understand and a step by step process.
In the file you run your jQuery functions add the code below.
Also, this has to come after jQuery and jCrop have been included on the page.
*edit - Ran into this issue also when building a new theme. The PSEUDO is...
@javier cool tricks with the png transparency. Does this still exist, i've yet to upload a png that is transparent.
Include jCrop CSS (or style yourself)
Call jCrop where needed (customise as you see fit)
Update hidden form field values
setSelect: [ 0, 0, 150, 150 ],
minSize: [150, 150]
// Use the API to get the real image size
var bounds = this.getBounds();
boundx = bounds;
boundy = bounds;
// Store the API in the jcrop_api variable
jcrop_api = this;
if (parseInt(c.w) > 0)
var rx = 150 / c.w;
var ry = 150 / c.h;
width: Math.round(rx * boundx) + 'px',
height: Math.round(ry * boundy) + 'px',
marginLeft: '-' + Math.round(rx * c.x) + 'px',
marginTop: '-' + Math.round(ry * c.y) + 'px'
Let me know how you get on.
should I put it in the file
Thanks, not sure where those functions are run.
@john Tried running the above code via console and it looks like those errors don't terminate the script.
Bit of a JS noob here, any ideas what JS errors are considered fatal? The console is returning a Type and Syntax error.
Maybe the console will allow code execution regardless of errors in a "sandbox" type environment.
Ah who knows. Is it legitimate to have side convos here? :p
If you give me FTP i'll get this on for you.
Works fine, tested as you can see from the latest Avatar on your site.
your picture looks centered.
any email where I can send you my ftp access?
alistair at pixelcoder dot co dot uk
You should also be able to send a message via wpquestions.com
Just joined this platform. Wish I had found it before. I just sent you a mail. Olivier
Yes, it's very good.
You're all set now, lift-offfff. :)
I will check immediately ;-)
My site is blank! only the buddypress bar remains....
Look at it: http://www.thinkplexx.com/blog/nadi/wordpress-image-croping-does-only-jpeg-buddypress-avatar-cropping-uppload-transparency-problem
I have been using BuddyPress and this solution was successful.
Already tried it but this code has already been depreciated. It was not working.
Uploading an image is working and it looks fine but the crop function is simply taking the upper left corner.
Look at the console. If you want send me FTP details via PM.
I have tested and you have an error in line 206 TOKEN ILEGAL:
I get an error on that page, line 206:
Fix that and I can look at the next bit...
which page address exactly?
As others have mentioned, please try fixing first the jQuery line with incorrect syntax in your site. I think this:
should have been:
$('#signup-welcome .p:last-child').css('display', 'none');
$('#signup-welcome p:last-child').css('display', 'none');
Either of the two line is correct syntax, so just try it for the meantime just to see what happens if that line is fixed.
That line of code maybe found in your header.php of your theme. That could might be the cause why other js functions on your site stopped working.
My site is blank! only the buddypress bar remains....</blockquote>
I noticed that too. Did you have someone work on it?
Yes Alistair took the lead so I put it on hold.