Coder Social home page Coder Social logo

gravatar's People

Contributors

alvinwhite avatar andreybutov avatar bjhijmans avatar carlos3duardo avatar gummibeer avatar jacotijssen avatar joshlewis avatar laravel-shift avatar mikeerickson avatar osaigbovoemmanuel1 avatar rebelinblue avatar rocramer avatar sburina avatar szepeviktor avatar tabacitu avatar tobias-nitsche avatar usernotnull avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gravatar's Issues

Exists always returns true

First, thanks for library. I found that Gravatar::exists() always returns true no matter what address you enter. Could I suggest you add the following as a check as this will return the right bool:

            $email= "[email protected]"; //for testing
                    $gravemail = md5( strtolower( trim( $email ) ) );
                    $gravImage = "http://www.gravatar.com/avatar/".$gravemail;
                    $gravcheck = "http://www.gravatar.com/avatar/".$gravemail."?d=404";
                    $response = get_headers($gravcheck);
                    print_r($response);
                    if ($response[0] != "HTTP/1.0 404 Not Found"){
                        echo('FOUND');
                        $img = $gravImage;
                    } else {
                        echo('FOUND');
                        // execute fallback
                    }

Valid email address

I got this message:

Creativeorange\Gravatar\Exceptions\InvalidEmailException: Please specify a valid email address in /var/app/current/vendor/creativeorange/gravatar/src/Gravatar.php:267,

and the email es a valid one, is a gmail like this: username5544@gmail.

V1.0.10 not really loading

Hello

When I install the package with composer it says that it installs the V1.0.10, but when I look at the vendor I see that composer.json doesn't have the discovery option for Laravel 5.5. So this is not the last version that is uploaded. I made the intallation many times and always the same result even if I clear composer cache...

Fix Typehint of Gravatar::get

\Creativeorange\Gravatar\Facades\Gravatar::get($email, $configGroup)

$configGroup needs to match the type in setConfig, otherwise, the IDE will warn that there's a type mismatch and we can't set an array as an option.

Resolved by PR #32

Caching

What about image caching for a certain period?

Gravatar don't update

if you use the fallback function the Gravatar is not updated with the latest picture

function get returns the latest one

Use HTTPS all the time

This library should just use HTTPS all the time for Gravatar. There's no reason not to. Using HTTPS inside of a site that is currently using HTTP doesn't cause any problems, but clearly the reverse is not true.

HTTPS forever! ๐Ÿ˜‰

Request - inline options

Love this package! It would be really nice to be able to set some options inline, such as the size. Finding that I am duplicating my configuration array several times for different image sizes.

Sorry, not familiar with how to label this as a request.. :)

checkEmail() function cause a validation problem

private function checkEmail($email) use filter_var() function with FILTER_VALIDATE_EMAIL as a second parameter. This is a problem because Laravel's email validator use different check for email.
For example Laravel consider maxim@localhost as a valid email, but FILTER_VALIDATE_EMAIL does not.

Please, consider to change filter_var() with FILTER_VALIDATE_EMAIL to standard Laravel 'email' validator

config/gravatar.php ignored on server

The settings file (vendor/creativeorange/gravatar/config/gravatar.php) is not being applied to the production site because the vendor directory is in .gitignore so as soon as the site is deployed, the default settings are installed.

Is there a way to have the gravatar.php config file inside the app/config directory as some other vendor settings are?

Laravel 5.4 Support??

Description does not list Laravel 5.4 as one of supported versions. I will give it a whirl anyhow and report back (and issue a README PR if it does work) :-)

Fallback does not work; functions are not used

Gravatar::fallback($googleMapsImgUrl)->get($dbContact->emailAddress); does not seem to use the fallback URL at all.

In fact, my Netbeans IDE shows that none of these functions in Gravatar.php get used at all:

  • sizeParameter
  • defaultParameter
  • ratingParameter
  • forceDefaultParameter

Gravatar::exists($emailAddress) and Gravatar::get($emailAddress) seem to work, though, so I'm using those.

Thanks! :-)

P.S. I recommend also adding in your setup instructions that use Gravatar; should be added at the top of whatever file we're calling it from. It took me a long time to figure that out. I was even accidentally trying use Creativeorange\Gravatar\Facades\Gravatar;, which didn't work.

Laravel 5.4 "Invalid argument supplied for foreach()"

Not sure if it's 5.4 specific but adding to a new project gave me:

"Invalid argument supplied for foreach()" pointing to \Illuminate\Support\Arr.php

Traced it down and looked like it just required me to make my the "default" entry in my gravitar config file an array instead of string:

'default' => 'identicon',

becomes:

'default' => ['identicon'],

Gravatar::fallback()

I am using like below

$data['gravatar'] = (!empty(auth()->user()->email)) ? Gravatar::fallback(url('images/user.jpg'))->get(auth()->user()->email) : null;

But why my output is like below ?

<img id="userImg" class="userImg" src="https://secure.gravatar.com/avatar/a516098e1de8e2756fa4bf045c7a4cb2.jpg?s=150&amp;d=http%3A%2F%2F127.0.0.1%3A8000%2Fimages%2Fuser.jpg&amp;r=g" alt="user">

Could anyone help me in this regard ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.