Search Results for 'crop'
-
AuthorSearch Results
-
June 18, 2012 at 10:38 pm #136035
In reply to: [Resolved] jQuery conflict
Tammie Lister
ModeratorWordPress comes with jQuery rolled in so therefore does BuddyPress. You can see how to safely add scripts here: https://codex.wordpress.org/Function_Reference/wp_enqueue_script
If the avatar cropping isn’t working though the first step would be to check and see if there are any plugin conflicts. Deactivate all plugins then if that doesn’t work set the theme to default to test. A link maybe to your site if that is possible could help track down something should the above not work.
May 30, 2012 at 7:57 pm #135287In reply to: Edit profile link leads to ‘page not found’ error?!?
@mercime
Participant@nirok thanks for posting the solution for your installation. This issue has started cropping up lately with some installs with different soutions for some like reinstalling WP/BP.
May 30, 2012 at 6:17 pm #135277In reply to: Avatar sizing
Hugo Ashmore
ParticipantYou need to explain what page you are referring to, avatars are displayed across many pages and most can have their size passed through as args.
Asking people to login to your site isn’t really going to help.
You can define constants that BP will use as crop sizes but will also re-size existing avatars, results will vary though depending on original size.
In bp-custon.php (create file if not existing in ‘plugins’ folde) add:
`
define( ‘BP_AVATAR_THUMB_HEIGHT’, 150 );
define( ‘BP_AVATAR_THUMB_WIDTH’, 150 );
define( ‘BP_AVATAR_FULL_HEIGHT’, 250 );
define( ‘BP_AVATAR_FULL_WIDTH’, 260 );
`
depending on which type you want to resize.If you want finer control then you need to id the page in question and someone can tell you how to modify.
May 23, 2012 at 6:58 am #134956In reply to: Error on registration page
Hugo Ashmore
ParticipantI did cover the image header question in the other thread – no I didn’t copy the code in to the thread as – in all honesty – stating “copy this ‘named’ function” ought to be sufficient to get started with.
I’ll now copy the function I referenced originally – you need to copy this into your child theme functions file, this function will alert BP not to run it’s original version and allows you to manipulate the rulesets that are created for custom headers.
`
function bp_dtheme_header_style() {
global $post;$header_image = ”;
if ( is_singular() && current_theme_supports( ‘post-thumbnails’ ) && has_post_thumbnail( $post->ID ) ) {
$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), ‘post-thumbnail’ );// $src, $width, $height
if ( !empty( $image ) && $image[1] >= HEADER_IMAGE_WIDTH )
$header_image = $image[0];} else {
$header_image = get_header_image();
}
?>#header { background-image: url(); }
#header h1, #header #desc { display: none; }
#header h1 a, #desc { color:#; }
<?php
}
`Now in the other thread I explained how to adjust the image dimensions by setting the define(‘HEADER_IMAGE_WIDTH’, 400) that will be displayed on the dashboard settings page and that represent the sizes the image will size and crop to, so you should still have that aspect in place.
If you leave the BP default layout unchanged then the header element width is likely wider than your background image ( the header width is stated in the stylesheet, the background image is set from the embedded styles in the code above) and that background image will repeat – but we went over that on the other thread, with the code above you can now add the required properties to prevent that.
Now code does need to be copied carefully and any stray code that may be causing issues might still affect things. Headers already sent errors have a number of reasons and are not necessarily easy for us to diagnose, I explained one possible cause but only you can determine if that is a reason.
On this issue of instruction; as I have said and now mercime this is a volunteer support forum, we are not obliged to provide absolute instruction we attempt to help and guide, also when one is a web dev professional there will be a level of expertise expected in general terms regarding coding experience. You are attempting to customise buddypress past what it offers in the default so you must expect certain aspects of doing that to be less than utterly idiot proof and there are aspects of BP that many of us struggle with.
May 18, 2012 at 6:57 pm #134755In reply to: How can I make the logo display? [RESOLVED]
Wendy Cockcroft
MemberSorry, Hugo, I need to know *exactly* what this is supposed to look like. Putting this in
`<?php
if ( !function_exists( ‘bp_dtheme_enqueue_styles’ ) ) :
function bp_dtheme_enqueue_styles() {}
endif;
?>function bp_dtheme_setup() {
global $bp;// Load the AJAX functions for the theme
require( TEMPLATEPATH . ‘/_inc/ajax.php’ );// This theme styles the visual editor with editor-style.css to match the theme style.
add_editor_style();// This theme uses post thumbnails
add_theme_support( ‘post-thumbnails’ );// Add default posts and comments RSS feed links to head
add_theme_support( ‘automatic-feed-links’ );// Add responsive layout support to bp-default without forcing child
// themes to inherit it if they don’t want to
add_theme_support( ‘bp-default-responsive’ );// This theme uses wp_nav_menu() in one location.
register_nav_menus( array(
‘primary’ => __( ‘Primary Navigation’, ‘buddypress’ ),
) );// This theme allows users to set a custom background
add_custom_background( ‘bp_dtheme_custom_background_style’ );// Add custom header support if allowed
if ( !defined( ‘BP_DTHEME_DISABLE_CUSTOM_HEADER’ ) ) {
define( ‘HEADER_TEXTCOLOR’, ‘FFFFFF’ );// The height and width of your custom header. You can hook into the theme’s own filters to change these values.
// Add a filter to bp_dtheme_header_image_width and bp_dtheme_header_image_height to change these values.
define( ‘HEADER_IMAGE_WIDTH’, apply_filters( ‘bp_dtheme_header_image_width’, 401 ) );
define( ‘HEADER_IMAGE_HEIGHT’, apply_filters( ‘bp_dtheme_header_image_height’, 80 ) );// We’ll be using post thumbnails for custom header images on posts and pages. We want them to be 1250 pixels wide by 133 pixels tall.
// Larger images will be auto-cropped to fit, smaller ones will be ignored.
set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true );// Add a way for the custom header to be styled in the admin panel that controls custom headers.
add_custom_image_header( ‘bp_dtheme_header_style’, ‘bp_dtheme_admin_header_style’ );
}`makes it worse, not better, because the code shows up above the header.
Here’s the CSS:
http://snazzymob.com/wp-content/themes/Snazzy/style.css
I don’t care how stupid I look to you as long as the end result is that I’m given the correct information. That means providing me with the actual code in the actual way it’s supposed to be entered in the functions.php file.
This is what is there now:
`<?php
if ( !function_exists( ‘bp_dtheme_enqueue_styles’ ) ) :
function bp_dtheme_enqueue_styles() {}
endif;
?>`There’s got to be a way to stop the header image repeating.
May 14, 2012 at 1:50 am #134501@mercime
ParticipantIn effect, you changed the site url/moved WP, I hope you backed up DB and server files before moving
– https://codex.wordpress.org/Changing_The_Site_URL specifically https://codex.wordpress.org/Changing_The_Site_URL#Changing_the_URL_directly_in_the_database
– https://codex.wordpress.org/Moving_WordPressIn some cases, the issue would be resolved by adding this to your wp-config.php file
`define( ‘WP_HOME’,’http: //mysite.com’ );
define( ‘WP_SITEURL’,’http: //mysite.com’ );`
change http://mysite.com to your actual domain nameApril 23, 2012 at 7:10 pm #133448In reply to: Uploaded Avatar Quality
InHouse
Member@shanebp No, that’s not it because the images looked great after uploading and prior to cropping. It was only after the page reloaded after cropping that they looked pixilated. And as I said earlier, I verified that the images after cropping were 650×250. And also, I’d still be having the issue if your guess was correct. I can’t explain why this worked but it did the trick. The server limits would take care of images too large anyways.
April 23, 2012 at 6:50 pm #133447In reply to: Uploaded Avatar Quality
shanebp
ModeratorCongrats on fixing the issue – although what you did makes no sense to me.
It would seem that your users can now upload 25 MB avatars.Post your bp-custom code re full-size and crop tool.
Did you ever try a png ?
That would let you know if it’s a compression issue or something else.My complete guess is that the images are being downsized prior to cropping and then expanded to your dims which is causing pixelation.
April 23, 2012 at 5:15 pm #133442In reply to: Uploaded Avatar Quality
InHouse
Member@shanebp, the crop tool produces any aspect ratio you choose. With my bp-custom modifications, the crop tool produces 650x250px images just fine with the exception of the image quality. Something is reducing the quality. I thought @djpaul was on to something and might still be, but his suggestion didn’t fix it.
April 23, 2012 at 4:51 pm #133441In reply to: Uploaded Avatar Quality
shanebp
ModeratorAvatars are usually square.
The cropping tool only does squares – at least on all my installs.Try defining a square size and check the quality.
Try a png to check quality.
If you want rectangular avatars, you’ll probably need to make changes to core files.
April 23, 2012 at 4:04 pm #133439In reply to: Uploaded Avatar Quality
InHouse
MemberThanks for replying @shanebp and @djpaul. I tried the JPG Image Quality plugin but that made no difference. The image compression is way less than 90% of the original image quality. I set it to 100 and the image looks the same. I’m uploading JPGs at various sizes. As I’ve said, I have pre-cropped to the exact size at 72 and 300 dpi with no success. I’ve also tried using uncropped images that are 3000px wide. Here’s my bp-custom.php code as requested:
`// Modify Avatar Sizes
define ( ‘BP_AVATAR_THUMB_WIDTH’, 130 );
define ( ‘BP_AVATAR_THUMB_HEIGHT’, 50 );
define ( ‘BP_AVATAR_FULL_WIDTH’, 650 );
define ( ‘BP_AVATAR_FULL_HEIGHT’, 250 );`I’m calling the full size in my profile-loop file. I verified that the images are indeed 650×250 at 72 dpi but the file size is being reduced by the uploading/cropping. Thanks again for any help.
April 19, 2012 at 7:15 pm #133234In reply to: Uploaded Avatar Quality
InHouse
MemberA little more information:
Image before upload: 139 KB
Image after upload: 41KBThere’s something wrong with a reduction of this magnitude when the image was pre-cropped to the exact size it needed to be before upload. I still can’t find any information on this.
April 15, 2012 at 8:23 am #133010In reply to: Avatar Cropping Issue
@mercime
ParticipantHow about when you upload a large image to your post, do you get the large, medium and small images as choice?
April 14, 2012 at 12:28 am #132941In reply to: Avatar can’t crop
VeeBeeGlobal
ParticipantUsing Firebug can do it..
It is an addon for Firefox. (and Chrome too)VeeBee
April 13, 2012 at 4:16 pm #132911In reply to: Avatar can’t crop
lyricsandlines
Member@djpaul How do I check for that?
April 13, 2012 at 7:10 am #132895In reply to: Avatar can’t crop
VeeBeeGlobal
ParticipantThis fault can also be caused from plugins which have css code.
ie img{height: auto; max-width: 100%;}This will cause issues to the cropping as well.
I have been tinkering with Responsive Templating, and that is a problem I battled for several hours with, until I found the reason causing the additional css, and then added my own css to my child template to solve the problem.
#avatar-upload-form img {max-width: none;}VeeBee
April 13, 2012 at 6:26 am #132893In reply to: Avatar can’t crop
Paul Wong-Gibbs
KeymasterDo you know how to check your web browser’s console for any javascript errors or warnings? This is usually some other’s plugin’s javascript loading at the wrong time, breaking BuddyPress.
April 12, 2012 at 10:45 pm #132881In reply to: Avatar can’t crop
lyricsandlines
MemberThe default buddypress theme has the same problem. I am using buddypress version 1.5.5. Also I know my theme has not been updated for buddypress (http://themezee.com/zeebizzcard/)..could that be the problem?
Anything else you need just lemme know, thanks for the help!
April 12, 2012 at 8:12 pm #132874In reply to: Avatar can’t crop
Tammie Lister
ModeratorI’ve seen this twice happen and once it was due to a scripting clash and the other time was due to using older versions of files than the BuddyPress being used.
Can I just get a clarification of what BuddyPress version you are using and if the theme you are using (even if custom) has been updated for that? Also, if possible as a ‘sanity check’ could you test using the default BuddyPress theme? Just so we have a baseline.
March 29, 2012 at 10:13 am #132116In reply to: Problem with avatar on with a MultiSite set-up
leosinclair
MemberSorry but no, it didn’t fix it. Here are the details. When using the Change Avatar form.
The Change Avatar form has a bug. Here are the step that identifies the bug:
1. Browse to image that needs to be uploaded.
2. Press the “Upload Image” button and the image gets loaded to the following folder: `wp-contentblogs.dir21filesavatars1imagename.jpg`
3. Then the “Avatar to cropAvatar preview” image is pointing to: `src=”http://websitenamehere.com/files/avatars/1/imagename.jpg` but the image isn’t there. So no image is displayed.So in other words it’s pointing to the wrong folders. Thanks. Look forward to seeing the fix. I would love to help this fix it but I’m not so sure where to begin with the code. It could take me a while and I could figure it out, or shorter time, if you give me a hint where to start.
Thanks again.March 23, 2012 at 6:07 pm #131882shanebp
Moderator>members posting stuff too
It’s tricky on mobile devices, but doable.
You’ll want to use the BP mobile theme for those or build your own.Apple Safari doesn’t allow uploading, so you have to use a workaround like Aurigma Up.
@modemlooper says he built an app that does the same thing and he’s considering releasing an unbrandable version with a site license – I for one sure hope he does.Android allows uploads but things like the avatar crop tool won’t work, afaik.
We built a custom avatar upload page with auto-crop for Android as part of our custom mobile theme.Hopefully you’re lucky enough to have a client that actually understands what is involved when they say they want a ‘facebook’.
March 11, 2012 at 5:16 pm #131235In reply to: Change Width of Buddypress and menus
jamesmcbennett
MemberPossibly this might help
http://www.fabsie.com/wp-content/uploads/2012/03/corrections-fabsie.pngThe
div#subnav.item-list-tabs {
margin: 0px 0px 20px 0px !important;
}
moves the GREEN LINEI want to move the dropdown menu saying “last active” towards left so that it fits within the white rectangle (green dashed line) without being cropped.
@mercine The above code is controlling the wrong part…..
March 9, 2012 at 6:29 pm #131104shanebp
ModeratorWe use Aurigma Up on a custom mobile page for iPhone/iPad. Works great. Uploads to your server.
Then use bp_activity_add() – you should be able to adapt this example.
http://bp-tricks.com/snippets/adding-a-new-activity-stream-entry-when-a-user-changes-his-avatar/For Apple – you need to check orientation using exif_read_data
For Android – you don’t need it for uploads – but the Avatar crop tool doesn’t work, so we did a custom page for that which includes basic auto-crop.
For both Android and Apple, we use this lib for rotation, thumbnails, resizing and cropping.
https://github.com/masterexploder/PHPThumb/wiki/Basic-Usage
Why not use WP methods? This lib gives us more control and better results.Note: we don’t use BP Mobile, so there is probably a better way if you do use it.
March 9, 2012 at 10:07 am #131079In reply to: Error editing profile fields
viktor89
MemberI have some other issues, and I thought I’d line them up.
I tried searching around the web, but I couldn’t come to a sollution. I have two buddypress-related issues, that I was hoping to get some help with.
1. is that http://roskilde-open.dk/om-os/sidens-medlemmer should display all the sites registered users, but for some reason it only shows those that registered or have logged in with us, since I migrated the site to a new host. Maybe I could do a “log all in and out”-call and it’d fix it, but I have no idea how. Maybe you guys have a better suggestion, but I’m running out of ideas

2. When a user uploads a new avatar, the crop function isn’t working as it should. It just shows part of the images not giving options to select wich area of the image to crop. I think it’s some js that’s either not being loaded or getting errors. I just don’t know where it’s going wrong and how I go about fixing it.
Thanks in advance
-ViktorMarch 8, 2012 at 9:54 pm #131057In reply to: Error editing profile fields
viktor89
MemberI don’t really know how to figure out if they’ve been loaded or not
Should I just read it in with my theme to be sure, or will a double load of j-crop crash things? -
AuthorSearch Results