Jump to content

Search the Community

Showing results for tags 'gravatar'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 2 results

  1. Hello everyone, for anybody using Gravatar who didn't hear the news: Gravatar had a data leak exposing the name, username and email address of your public profile: https://monitor.firefox.com/breach-details/Gravatar For me reason enough to never use Gravatar again, but that is of course my personal decision. ? Regards, Andreas
  2. Hello PW Community, I'm trying to modify a small module I found to pull in Gravatars but I'm having a bit of an issue and was curious if someone has already done a Gravatar implementation, or could look over the module code? It installed no problem, but when I try to use it, nothing works. Here is the full module: <?php /** * Module for generating Gravatar URLs for ProcessWire users. * * Use it like this: * * Get URL only with all defaults: * $user->gravatar() * * Get image tag with different size: * $user->gravatar(array('img' => true, 's' => 200)); * */ class Gravatar extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => 'Gravatar', 'version' => 1, 'summary' => 'Gravatar hook for users', 'singular' => true, 'autoload' => true, 'icon' => 'smile-o', ); } public function init() { $this->addHook('User::gravatar', $this, 'methodGravatar'); } public function methodGravatar($event) { $u = $event->object; if ( ! $u instanceof User) $event->return = false; return; if ( ! $u->email) $event->return = false; return; $params = ($event->arguments(0) ? $event->arguments(0) : array()); // Default options $defaults = array( 's' => 100, 'd' => 'retro', 'r' => 'g', 'img' => false, 'attrs' => array(), ); $opts = array_merge($defaults, $params); extract($opts); $url = '//www.gravatar.com/avatar/'; $url .= md5(strtolower(trim($u->email))); $url .= "?s=$s&d=$d&r=$r"; if ($img) { $url = '<img src="' . $url . '"'; foreach ($attrs as $key => $val ) { $url .= ' ' . $key . '="' . $val . '"'; } $url .= ' />'; } $event->return = $url; } } The issue is when I use $user->gravatar() I'm getting back "unknown". I know that the email being used by the current logged-in user (me) does have a Gravatar, but I'm unable to get the URL so I can place it into my template markup. Any insight or direction would be appreciated. I did a search for Gravatar modules / forum topics but it mostly appears to be linked to the Blog profile that uses Gravatar, not a stand-alone module / implementation. Regards, VirtuallyCreative
×
×
  • Create New...