Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • @darqpony

    Participant

    LOL… yes I have buddypress installed.

    @darqpony

    Participant

    Again, I ask, does anyone have a better way? I am getting the above Fatal Error, and I would still like to know if there is a better way of doing this without editing core files?

    @darqpony

    Participant

    I”m still working on this. Getting a “Fatal error: Call to undefined function bp_get_loggedin_user_fullname” I don’t get to work on this as much as I’d like so bear with me… Life, ya know? 🙂

    And this is not necessarily what I ‘asked’ for… I don’t know enough to ‘ask’ for anything! LOL I was going to put the custom code in a custom file that wasn’t going to get overwritten upon upgrade. Does that not work? If you have a better way, please please please teach me! Or point me in the right direction?

    I’ve tried the code in both places, in the original and in the custom code and it still gave me an error so, there you go! 🙂

    @darqpony

    Participant

    Yes! that! Since I know so little about php coding, I didn’t know WHAT to do instead of the choice it gave me or where to look.

    1. I understand about the upgrade will overwrite thing. If I put this bit of code in my bpcustom.php file, will it override the original “$avatar_size = ( ‘full’ == $type ) ? ‘-bpfull’ : ‘-bpthumb;” or do I have to somehow negate that first in the bpcustom file?

    2. I have this in the bp_core_fetch_avatar:

    function bp_core_fetch_avatar( $args = '' ) {
    
    	// If avatars are disabled for the root site, obey that request and bail
    	if ( ! buddypress()->avatar->show_avatars )
    		return;
    
    	global $current_blog;
    
    	$bp = buddypress();
    
    	// Set a few default variables
    	$def_object = 'user';
    	$def_type   = 'thumb';
    	$def_class  = 'avatar';
    
    	// Set the default variables array
    	$params = wp_parse_args( $args, array(
    		'item_id'    => false,
    		'object'     => $def_object, // user/group/blog/custom type (if you use filters)
    		'type'       => $def_type,   // tinythumb, thumb or full
    		'avatar_dir' => false,       // Specify a custom avatar directory for your object
    		'width'      => false,       // Custom width (int)
    		'height'     => false,       // Custom height (int)
    		'class'      => $def_class,  // Custom <img> class (string)
    		'css_id'     => false,       // Custom <img> ID (string)
    		'alt'        => '',    	     // Custom <img> alt (string)
    		'email'      => false,       // Pass the user email (for gravatar) to prevent querying the DB for it
    		'no_grav'    => false,       // If there is no avatar found, return false instead of a grav?
    		'html'       => true,        // Wrap the return img URL in <img />
    		'title'      => ''           // Custom <img> title (string)
    	) );
    	extract( $params, EXTR_SKIP );
    

    Where do I ‘pass’ thumb or full to it? Or is it already there in this original since I haven’t changed anything yet?

    3. If I change the bp_core_fetch_avatar, do I have to somehow change the first 1.’s solution?

    4. Should I post this on the other site you found my question on? LOL (Hey, I gave it two days before trying a different site! But got the same guy answering… go figure… LOL)

    … and yes, it did use the tinythumb type and it did make the thumb sized avatar fuzzy. I have an avatar for that size. I want it to use it! LOL I want to use ALL my avatars!

    @darqpony

    Participant

    The below is in bp-core-avatars.php file.

      /**
      * Look for uploaded avatar first. Use it if it exists.
      * Set the file names to search for, to select the full size
      * or thumbnail image.
      */
      $avatar_size = ( ‘full’ == $type ) ? ‘-bpfull’ : ‘-bpthumb’;
      $legacy_user_avatar_name = ( ‘full’ == $type ) ? ‘-avatar2’ : ‘-avatar1’;
      $legacy_group_avatar_name = ( ‘full’ == $type ) ? ‘-groupavatar-full’ : ‘-groupavatar-thumb’;

    On the line where it says $avatar_size, I need to be able to add for it to look for the ’-bptinythumb’ size ALSO. How do I do that?

    @darqpony

    Participant

    Sorry about the double post… the first didn’t show up for a while so I rehit submit…

    Back to the issue:

    If I remove

      $avatar_size = ( ‘full’ == $type ) ? ‘-bpfull’ : ‘-bpthumb’;

    from my bp-core-avatars.php file, all my avatars revert back to my default avatar pic.

    @darqpony

    Participant

    Yes, I already have the different various sizes of avatar. I have the Tinythumb, Thumb, and Full sizes. And I can change them to whatever width and height I’d like them to be. I could make miiiiyyyons of them if I so chose. Thumb1, Thumb2, Thumb3, etc. . . . Not the issue. I’m stuck in the calling of them to my themes widget. I can call only two of those sizes. If I change $avatar_size = ( ‘full’ == $type ) ? ‘-bpfull’ : ‘-bpthumb’; to add ‘-bptinythumb’, it defaults back to the default of full and bpfull or bpthumb. I can’t get it to USE bptinythumb in the theme. Or in actuality, to USE more than two, hence I need it to SEE the third size avatar.

    🙂

    And thanks so much for taking a look at this guys.

    @darqpony

    Participant

    Yes, I already have the different various sizes of avatar. I have the Tinythumb, Thumb, and Full sizes. And I can change them to whatever width and height I’d like them to be. I could make miiiiyyyons of them if I so chose. Thumb1, Thumb2, Thumb3, etc. . . . Not the issue. I’m stuck in the calling of them to my themes widget. I can call only two of those sizes. If I change $avatar_size = ( ‘full’ == $type ) ? ‘-bpfull’ : ‘-bpthumb’; to add ‘-bptinythumb’, it defaults back to the default of full and bpfull or bpthumb. I can’t get it to USE bptinythumb in the theme. Or in actuality, to USE more than two, hence I need it to SEE the third size avatar.

    🙂

    And thanks so much for taking a look at this guys.

    PS: And I’m gonna check to see what bp_core_fetch_avatar does… maybe rewriting it will get me what I want. Maybe you guys know already how I should rewrite it? *Hint hint* LOL

    @darqpony

    Participant

    That’s the easy way out and already being done by the theme. My goal here is two-fold. Gmetrix.com’s web optimization said I should serve already scaled images and as I search for the way to do that, it has now become a mission. I just want to know HOW! Scaling down a thumb isn’t the same as having that third size (I have it) and being able to use that third size (creates an error once called into action). I cannot figure out why I can’t get that third size to be used without an error. I figure once I learn the ‘why’, I will understand so much more.

    🙂

Viewing 9 replies - 1 through 9 (of 9 total)
Skip to toolbar