Skip to:
Content
Pages
Categories
Search
Top
Bottom

Avatar

Viewing 14 replies - 1 through 14 (of 14 total)
  • Avatar of Hollosch
    Hollosch
    Participant

    @hollosch

    Yes, this make sense because 10 events from the same creator have 10 different avatars. why not the standard-avatar of buddypress ?

    Avatar of kunalb
    kunalb
    Participant

    @kunalb

    Changing an avatar is possible by using the thumbnail uploader. The avatar for each event is generated using monster wavatars by setting a random email address for generating the image. There’s a bug in the thumbnail chooser that the default image avatar option chosen isn’t used and it ends up using the original avatar setting always.

    Avatar of Hollosch
    Hollosch
    Participant

    @hollosch

    Hi, where to use the thumbnail uploader? i can still create/edit events without changing avatar…

    Avatar of mafgirl
    mafgirl
    Member

    @mafgirl

    @kunalb
    I have three questions:
    1. Where will I find the thumbnail uploader?

    2. I do not want to display any gravatar/avatars on my website and have managed to change code in functions.php to avoid them in profiles (now have mystery man or personal uploaded picture) and groups (now have custom logo of website or personal uploaded picture). I would like to do the same for events, is this possible?

    3. I created an event when I had a different theme, and it came with a map option and very self explanatory registration pages and worked really well
    I have recently changed to the theme ‘buddy builder’ by patrick cohen and now when I create an event, it does not give me an option for a map and a very complicated looking registration page, including a fatal error at the bottom ” Fatal error: Call to undefined function print_column_headers() in /home/driversz/public_html/wp-content/plugins/eventpress/views/admin.php on line 693″
    I have a feeling this may have to do with the new theme, any ideas how to fix this?

    I am using WPMU 3.1, BP 1.2.8 and EP 0.1.2.3. I’ve also installed and activated Buddy Press Custom Posts version 0.1.2.3

    website: http://www.driverszone.co.uk (Still under construction, but it is usable, and you can sign up and create an event if you’d like to see what I mean)

    THANKS!

    Avatar of kunalb
    kunalb
    Participant

    @kunalb

    @mafgirl Wrt 3, I’ve never actually checked eventpress in network mode, nor with BP1.2.8 or WP3.1 even. I’m planning the next release to directly be compatible with BP1.3, so I’m afraid I can’t really help you out at the moment. Even then, EP will not be tested with network mode.

    Avatar of mafgirl
    mafgirl
    Member

    @mafgirl

    @kunalb ok, thanks for your reply! When will the new release be out?
    and do you know what the error might be ( ” Fatal error: Call to undefined function print_column_headers() in /home/driversz/public_html/wp-content/plugins/eventpress/views/admin.php on line 693? )? As said, it did work with a different theme, so I am guessing it does work with WPMU

    Avatar of kunalb
    kunalb
    Participant

    @kunalb

    @mafgirl Probably by 1st April or so. That error is because I was directly using some of WP Admin’s internal functions to display the tables—there were some changes to that in WP3.1 which probably caused this to break, though I’m not sure.

    Avatar of mafgirl
    mafgirl
    Member

    @mafgirl

    @kunalb The new release is working (on my WPMU :) )and you can upload a thumbnail/featured image, BRILLIANT!
    Is it also possible to set a default thumbnail, maybe in the code somewhere? I do not like the monster avatars and would rather have a default image for when users do not set a thumbnail.
    To do this for groups, I have used this code in functions.php of my current theme
    `//Remove Avatar

    add_filter( ‘avatar_defaults’, ‘newgravatar’ );

    function newgravatar ($avatar_defaults) {
    $myavatar = get_bloginfo(‘template_directory’) . ‘http://driverszone.co.uk/images/GarageDoor.jpg’;
    $avatar_defaults[$myavatar] = “Garage Door”;
    return $avatar_defaults;
    }

    //Remove Gravatar
    function my_default_get_group_avatar($avatar) {

    global $bp, $groups_template;

    if( strpos($avatar,’group-avatars’) ) {

    return $avatar;
    }

    else {
    $custom_avatar = get_stylesheet_directory_uri() .’/images/GarageDoor.jpg’;

    if($bp->current_action == “”)
    return ‘group->name ) . ‘” />’;
    else
    return ‘group->name ) . ‘” />’;
    }
    }
    add_filter( ‘bp_get_group_avatar’, ‘my_default_get_group_avatar’);`

    Could I do something similar for your events?
    Thanks for the working upgrade :) :)

    Avatar of kunalb
    kunalb
    Participant

    @kunalb

    :)

    Check buddypress-custom-posts/tags.php, line 128 (`bpcp_get_type_avatar`). At the moment, this has a bug that seems to only pick the monster avatars instead of what is set in BP default. Till the next release, which should be within the ~30 days you can try modifying the `else` clause which sets the default avatar (lines 148-179).

    Avatar of mafgirl
    mafgirl
    Member

    @mafgirl

    @kunalb thanks, did you mean buddypress-custom-posts/themes/tags.php ?
    I can see the code referencing to avatars and gravatars but I am not confident enough to start changing things.
    If I just want to use a default thumbnail (like I do with my groups) which is /images/GarageDoor.jpg
    How could I adapt the code please?
    And I’ve just noticed that maps work in IE, but do not show in Safari.. any idea why?
    And a last but not massively important question, can I customize the colour of the text and text box of the event? If you look at http://driverszone.co.uk/events/stoneleigh-kit-car-show-2011/ you will notice that it is in a white/light box with orange text that does not go with the colours of my site at all..

    Thanks kunalb!

    Avatar of kunalb
    kunalb
    Participant

    @kunalb

    @mafgirl Yup, that’s the file.

    If you don’t care about uploading custom event thumbnails, you can probably replace the contents of the complete function with a `return ““;`. I haven’t tested it out, but I guess you get the idea.

    I’m surprised about the IE/Safari issue–i’d suggest checking the Safari Developer console to see what could be the reason.

    Regarding css, you could try dequeuing the default stylesheets added by eventpress and enqueuing your own. Or perhaps you could over-ride the styles with your own custom stylesheet.

    Avatar of Kchun
    Kchun
    Participant

    @kchun

    In order to preserve the users’ ability to upload custom event avatars (featured image) but substitute my own image (in this case mystery man) I added the following line in tags.php about line 173 just before we filter the avatar:


    if(strpos($gravatar,”wavatar”)) $gravatar=”/wp-content/plugins/buddypress/bp-core/images/mystery-man-50.jpg”;


    // Filter gravatar vars
    $gravatar = apply_filters( ‘bp_gravatar_url’, $host ) . md5( strtolower( $email ) ) . ‘?d=’ . $default_grav . ‘&s=’ . $grav_size;

    You could substitute your own image path. But it seems to work in getting rid of the wavatars. Kinda klutzy but does the job. :-)

    Avatar of Kchun
    Kchun
    Participant

    @kchun

    it just occurred to me that it would be far better to add this statement to a filter that you give priority to for “bp_gravatar_url”. Then you’re not changing the buddypress_custom_posts plugin code and it is more elegant.

    Avatar of granville
    granville
    Participant

    @granville

    Hi @KChun – I tried your method but unfortunately it didn’t work. However, looking at the code, there is a simpler way.

    In the file /wp-content/plugins/buddypress-custom-posts/themes/tags.php

    Just above where you suggested, around line 173, find the line that begins

    // Set gravatar type
    if ( empty( $bp->grav_default->{$object} ) )
    $default_grav = ‘wavatar’;

    and simply replace ‘wavatar’; with whatever link you want. For instance, to use the gravatar logo, replace the above with

    // Set gravatar type
    if ( empty( $bp->grav_default->{$object} ) )
    $default_grav = ‘http://www.gravatar.com/avatar/’;

    If anyone wants to use their own default image, they could simply write the link directly pointing to the image on their site; i.e. myurl.com/wp-content/themes/mytheme/image/default.jpg or whatever.

    As with using the gravatar logo, the link could even be any external site image too; just don’t violate any copyrights!

    Hope this helps some folk

    Rob G

Viewing 14 replies - 1 through 14 (of 14 total)

You must be logged in to reply to this topic.