Support » Plugin: Site Reviews » Use profile image instead of gravatar

  • Hi,
    first of all thank you for the plugin. I tried all business review plugins and find yours the best option with Flatsome theme (at least).
    In settings you allow using gravatar. How about custom user images uploaded from social networks?
    E.G. I use Nextend Fb Connect which pulls profile image (like here http://prntscr.com/gh013m)
    How can I tell the plugin to check if there is another profile picture, if not then use gravatar ?
    thank you

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Gemini Labs

    (@geminilabs)

    You can use the “site-reviews/get/review” hook to change the profile image when the reviews are fetched:

    add_filter( 'site-reviews/get/review', function( $review ) {
        // do something, e.g. change the $review->avatar to something else
        // the review $post->ID is $review->ID and the $post->post_author is $review->user_id
        return $review;
    });
    • This reply was modified 2 years, 2 months ago by Gemini Labs.
    Plugin Author Gemini Labs

    (@geminilabs)

    You can also use the ‘site-reviews/local/review’ filter hook to change the avatar value when a review is created:

    add_filter( 'site-reviews/local/review', function( array $review ) {
        // change the $review['avatar'] here
        return $review;
    });

    I want to use ultimate member profile image instead of gravatar for site reviews. Is it possible to replace it using your provided hook?

    Plugin Author Gemini Labs

    (@geminilabs)

    1. To modify a review as it is being submitted, use the site-reviews/local/review filter hook as shown above.

    2. To modify existing reviews as they are being displayed, use the site-reviews/get/review filter hook:

    add_filter( 'site-reviews/get/review', function( $review ) {
        // 1. Use $review->email to get the ultimate member user profile
        // 2. If the user exists and they have an avatar, get the avatar URL and assign it to $review->avatar
        // 3. Make sure to always return $review
        return $review;
    });
    
    • This reply was modified 1 year, 10 months ago by Gemini Labs.
    • This reply was modified 1 year, 10 months ago by Gemini Labs.
    • This reply was modified 1 year, 10 months ago by Gemini Labs.
    • This reply was modified 1 year, 10 months ago by Gemini Labs.

    Is there a way to allow reviewer to upload their image?
    Honestly, the set of features of this plugin is excellent and the only thing preventing me to switch to it is inability to:
    1. let reviewer upload their image.
    2. additional fields e.g. Company Name, Location(City & State)

    Would greatly appreciate it if these are solvable!

    Plugin Author Gemini Labs

    (@geminilabs)

    @michaelezra

    1. It’s not possible in v2 of Site Reviews to upload an image because it would require a rewrite of the plugin’s javascript that handles review submissions. Also IE9 support would have to be dropped.

    2. While it is technically possible to add your own fields using a custom submission form and using some of the internal filter hooks to perform your own validation and saving the custom fields to the review, it is not officially supported in the current version.

    Thank you for such prompt response!
    I will keep an eye on your plugin. If you get to address these two points fully, please update this thread (I will get auto-notified). Thank you!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Use profile image instead of gravatar’ is closed to new replies.