Forum Replies Created
-
if you want… or have time.. you can check out my site… http://www.aebusinessnetwork.com as an example… i am in the process of building it now.
i found the problem.. but not the solution. there is a javascript i am running called <script type="text/javascript" src="/js/jquery-1.3.2.js”>
that… when i take it out…. enables the crop lines to show up. Pain in the butt. the problem is that the jquery1.2.3 is controiling my drop down menu. Any ideas how i can keep the js and still have the cropping functionality?WP – 3.0.1
BuddyPress – 1.2.5.2
Buddypress theme with compatibility
Ok.. I want to make clear the problem I have been having with my Avatar Cropping process in my BuddyPress installations.
I can crop successfully on my dashboard, Using the “User-Avatar” plugin. But then I installed buddypress and when users attempt to build their own avatars inside the themed site, the only thing I get is a cropped preview of the top left corner of any picture I choose(both pictures display properly), but no ability to crop or even see the cropping elements.
I have read thru the solutions, and tried to implement them. First.. I use “qian-ava”s solution. I am using WP 3.0… so I need to find my Upload paths by going to..
SETTINGS -> MEDIA
When there I add to the Uploading Files fields by entering “wp-content/uploads” into the” Store uploads in this folder” area and my full path of http://www.ningbotoday.com/wp-content/uploads/ into the “Full URL path to files” area. Just note… I added all the double quotations.
After I do this I attempt to go into line 389 of my bp-core-avatars.php file and…
‘Replace:
if ( !$path = get_option( ‘upload_path’ ) )
$path = WP_CONTENT_DIR . ‘/uploads’;
With:
if ( !$path = get_option( ‘upload_path’ ) )
$path = WP_CONTENT_DIR . ‘/uploads’;
else $path = ABSPATH . $path;’
But… I do not have the “if” statement to replace! The closest thing I have is from 384 – 390…
‘if ( empty( $bp->avatar_admin->resized ) )
$bp->avatar_admin->image->dir = str_replace( BP_AVATAR_UPLOAD_PATH, ”, $bp->avatar_admin->original );
else {
$bp->avatar_admin->image->dir = str_replace( BP_AVATAR_UPLOAD_PATH, ”, $bp->avatar_admin->resized );
@unlink( $bp->avatar_admin->original );}’
But I don’t see anything that I can replace. So either way.. I tried to test the script and just pop it in nearest to the line 389 to no avail. I ended up getting an error and my page does not load. Back to the drawing board. I reversed the process and started again.I then took “Creay”s advise (https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/avatar-upload-issues/?topic_page=7&num=15#post-70855), because his problem directly describes mine, and decided to look into the expression of Jcrop and its possibility of not firing off. He changed core-cssjs.php inside the pb-core folder inside the buddypress plugin. He added
‘<script src="/wp-includes/js/jcrop/jquery.Jcrop.js”>’
After the line ‘$aspect_ratio = (int) constant( ‘BP_AVATAR_FULL_WIDTH’ ) / (int) constant( ‘BP_AVATAR_FULL_HEIGHT’ ); ?>’I have a area in my bo-core-cssjs.php file that reads between line 88-91
‘ // Calculate Aspect Ratio
if ( (int) constant( ‘BP_AVATAR_FULL_HEIGHT’ ) && ( (int) constant( ‘BP_AVATAR_FULL_WIDTH’ ) != (int) constant( ‘BP_AVATAR_FULL_HEIGHT’ ) ) )
$aspect_ratio = (int) constant( ‘BP_AVATAR_FULL_WIDTH’ ) / (int) constant( ‘BP_AVATAR_FULL_HEIGHT’ );
?> “
So after the ?> I added the line. Nothing. Still not getting the crop to work properly. I encourage anyone to take a try and register on the site.. I would like to nail this problem down before I launch the site or even more to far forward. The site is http://www.ningbotoday.com
Thank you for all your help in advance.ooh.. and to add… i used the plugin “user-avatar” and the crop from the dashboard profile works fine.. so i know it has something to do with my themes expression of the code…
Hey everyone. I am having the same problem. I have tried most everything… but i am sure it has something to do with the jcrop function being disabled by the theme i am working from. Can someone please HELP ME?!? it is driving me crazy. The site is http://www.ningbotoday.com… and so far i have enacted most of the solutions in this topic. For the most recent… my bp-core-cssjs.php file has the following line..
// Calculate Aspect Ratio
if ( (int) constant( ‘BP_AVATAR_FULL_HEIGHT’ ) && ( (int) constant( ‘BP_AVATAR_FULL_WIDTH’ ) != (int) constant( ‘BP_AVATAR_FULL_HEIGHT’ ) ) )
$aspect_ratio = (int) constant( ‘BP_AVATAR_FULL_WIDTH’ ) / (int) constant( ‘BP_AVATAR_FULL_HEIGHT’ );
?>
So i add the line as you say, and i get nothing. I have also changed the upload directory to the specific directory, and no love there either. I want to get thru this so i can attend to the rest of the slew of projects i have lined up for this site. Can anyone help?