View Full Version : Show Thread Enhancements - [1e2] Gravatar as Default Avatar for users without image: auto generate random avatar
galerio
04-17-2011, 10:00 PM
With this very sipmple plugin you can display a Gravatar (http://en.gravatar.com/) icon as default avatar for users that don't have any avatar saved or selected. But if an user has its own avatar, this one will be used instead of Gravatar. So you can continue to use your forum's avatar system, and this plugin will be used only when an avatar is not present.
The Gravatar is unique and automatically genereted based on registration email address choosen by the user. And the avatar created is used in every other website that use this method, like Wordpress blogs.
Users that are registered to gravatar.com can upload their avatar image so that every website that uses Gravatar will display the uploaded personal image! So you can save your personal avatar one time and have it spreaded everywhere Gravatar system is used.
Images are hosted on gravatar.com website, so you don't have any increase to your server load or bandwidth.
In this way every user (old users and new users) will have an avatar image, and to recognize the author of a post will be simplier for all because unique images are assigned to each one.
Your forum will be more userfriendly and nice looking!
Demo Link (http://www.1e2.it/forum/iamm-41/musicjukebox-1794.html)
Demo Link for Gravatar in Sidebar (http://www.1e2.it/forum/)
How To
1- Go to Plugins & Products -> Manage Products -> [Add/Import Product], then select the xml file downloaded, click Yes for Allow Overwrite and click Import button
2- Go to Settings->Options->User Picture Options and you will find three new option at the end of the page (see screenshot) where you can:
* Choose the Gravatar Type (choose between different Gravatar icon):
404: do not load any image if none is associated with the email hash, instead return an HTTP 404 (File Not Found) response. But if an user has its own avatar saved on gravatar.com, that image is displayed.
https://vborg.vbsupport.ru/external/2011/06/68.jpgmm: (mystery-man) a simple, cartoon-style silhouetted outline of a person (does not vary by email hash). But if an user has its own avatar saved on gravatar.com, that image is displayed.
https://vborg.vbsupport.ru/external/2011/06/69.jpgidenticon: a geometric pattern based on an email hash. But if an user has its own avatar saved on gravatar.com, that image is displayed.
https://vborg.vbsupport.ru/external/2011/06/70.jpgmonsterid: a generated 'monster' with different colors, faces, etc. But if an user has its own avatar saved on gravatar.com, that image is displayed.
https://vborg.vbsupport.ru/external/2011/06/71.jpgwavatar: generated faces with differing features and backgrounds. But if an user has its own avatar saved on gravatar.com, that image is displayed.
https://vborg.vbsupport.ru/external/2011/06/72.jpgretro: awesome generated, 8-bit arcade-style pixelated faces. But if an user has its own avatar saved on gravatar.com, that image is displayed.
* Choose the Gravatar Dimension from 1 to 512 pixel square (default is 80) accordingly to your theme. You must write only numbers without characters or punctuation (so for example 120 and not 120px nor 120,5).
* Choose the Gravatar Dimension for your Sidebar from 1 to 512 pixel square (default is 30) accordingly to your theme. You must write only numbers without characters or punctuation (so for example 120 and not 120px nor 120,5).
*- Choose the Gravatar Ratings. All images are rated default as "g":
g: suitable for display on all websites with any audience type.
pg: may contain rude gestures, provocatively dressed individuals, the lesser swear words, or mild violence.
r: may contain such things as harsh profanity, intense violence, nudity, or hard drug use.
x: may contain hardcore sexual imagery or extremely disturbing violence.
Note: uninstall Geekydesigns default avatar hack (https://vborg.vbsupport.ru/showthread.php?t=227947) to make work.
A manual edit for 4 files is needed if you want gravatar also in Blog and in ForumHome Sidebar. It's a simple search and replace, you can do it in 1 minute.
As soon as I have time, I will make automatic the manual edit and I will add gravatar support also for CMS.
The plugin adds a footer link to author website as copyright mark, but I don't require you to keep it. To remove the copyright info just disable the plugin for footer link:
go to Plugins & Products->Plugin Manager and search the plugins for Gravatar as Default Avatar and delete or disable the one named "Profile Hooks". Consider a donation if you do so.
Remember to Marsk as Installed (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=262196)
and to Nominate as Mod Of Month (https://vborg.vbsupport.ru/vborg_miscactions.php?do=nominate&threadid=262196&type=1)
vBulletin 3.8 version, please, download HERE (https://vborg.vbsupport.ru/showthread.php?t=262583)
Changelog:
v 1.0 Initial release
v 1.0.1 corrected a bug that makes the gravatar all the same in user profile
v 1.1.0 Added a rudimental menu option to choose gravatar type, dimension and ratings
v 1.1.1 Improvements in option menu to prevent errors and make it easier
v 1.1.2:
Added option to choose dimensio for gravatar in sidebar.
Added a file called "gravatar in sidebar and blog.txt" with instruction to manual edit 4 file in order to have gravatar also in Sidebar blocks and in Blog.
v 1.1.2p1 updated manual edits for VB 4.1.4 and 4.1.5
v 1.1.2p2 update for VB 4.1.8 and added HTTPS version
v 1.1.2p3 updated for VB 4.1.10
Brandon Sheley
04-18-2011, 01:03 PM
nice!
Looking forward to the XML :)
* Brandon Sheley tagged it
galerio
04-18-2011, 01:42 PM
XML file uploaded. But I need to create only one xml file with a page option where you can select directly the Gravatar type and the dimension.
I need some free time... but I will do it.
starman?
04-18-2011, 03:04 PM
Installed and working. Thanks. Please note that if you have Geekydesigns default avatar hack (https://vborg.vbsupport.ru/showthread.php?t=227947&highlight=avatar) installed then you must uninstall it for this to work.
Juggernaut
04-19-2011, 12:26 AM
Installed. :D
Juggernaut
04-19-2011, 01:13 AM
Is there a way to use images that we've uploaded to gravatar.com, to save bandwidth?
galerio
04-19-2011, 09:26 AM
Every user must register to gravatar.com and upload his personal avatar, you can't do a bulk upload.
When you register on gravatar.com you can add other email addresses to your account and associate an avatar to each one, but you must add emails one by one and you must click on confirmation link sent to each email.
If you want, you can advise your users about gravatar.com and tell them to register and upload their avatar
galerio
04-21-2011, 01:34 PM
I have just added a rudimental menu option in User Picture Options. Now I have to learn more about xml language to make multiple choices options.
Anyway, now you can select dimension, rating and type of gravatar in your control panel without editing any xml.
Juggernaut
04-22-2011, 01:42 AM
Thank you for this great mod. :D
mitch84
04-22-2011, 04:53 AM
thank you for this update
ru55ian
04-24-2011, 12:46 AM
awesome, works in 3.8.7 Thanks
galerio
04-24-2011, 09:14 AM
@ru55ian
really? Does it works on vb 3.8.7 without any modification? Or do you have changed something in the code? Can you tell me also if the menu option is working?
galerio
04-25-2011, 10:14 PM
Just a small update to menu option to prevent admin to write wrong options.
thespi
04-26-2011, 06:08 PM
Really good work!
karlm
05-13-2011, 10:45 PM
I was just looking over gravatar.com and considering trying my hand at coding this... I thought I'd have a quick look over here first though in case someone had wrote it already - YAY, someone has... saved me a lot of head scratching :)
karlm
05-13-2011, 11:40 PM
ps - this doesn't work on the blogs nor the CMS area :(
Hope you can update accordingly :))
galerio
05-14-2011, 07:52 AM
Yes, I'm working on it. I want it too on my forum ;)
Now I will release an update where you can select the dimension of the avatar for the single part: profile, postbit and userlist. Then I hope it will be the time for the full version!
galerio
06-08-2011, 08:41 AM
I just added a txt file with instruction to add Gravatar icons to sidebar and blog. Unfortunatly there are no hooks to make theese changes automatically with xml.
Anyway, I'll try to find a way to make theese changes automatic.
You need to update also the xml if you want to add the sidebar gravatar.
About cms, it uses different method to display avatar... I think I have to look into database. So, by now CMS is excluded. But I'll do it also for CMS area. Don't worry.
Jim Westergren
06-15-2011, 10:09 AM
Warning!!
This plugin contains the following code:
<plugin active="1" executionorder="5">
<title>Profile Hooks</title>
<hookname>process_templates_complete</hookname>
<phpcode><![CDATA[
$footer .= "<div align='center'><a href='http://www.1e2.it/forum/'><img width='1' height='1' border='0' src='clear.gif' title='1e2 Forum' alt='1e2 Forum' /></a></div>";
]]></phpcode>
</plugin>
This means that the plugin creator injects a hidden link to his own forum without your knowledge or permission. This is also a hidden link which is exactly what Google dislikes. Your forum might get penalized or banned by Google if you install this plugin.
Make sure you remove the above lines.
Jim Westergren
06-15-2011, 10:43 AM
The plugin is also missing code to add the gravatars to the sidebar ...
galerio
06-15-2011, 11:19 AM
It's copyright mark. If you don't want, you can disable the plugin.
-edit- I changed the code so that the copyright text is now a visible link.
The code to display gravatars in sidebar is in the TXT inside the zip archive: you must do manual edit.
Jim Westergren
06-15-2011, 12:32 PM
Ok thanks.
Edit: Sorry but I can't accept a link. I'll rather send you some $. Sending you a PM.
galerio
06-15-2011, 12:47 PM
No, please, I don't want money to delete the link. If you don't want it, just disable the plugin for footer link:
go to Plugins & Products->Plugin Manager and search the plugins for Gravatar as Default Avatar and delete or disable the one named "Profile Hooks".
I don't require to keep the copyright footer.
Jim Westergren
06-15-2011, 12:56 PM
Ok, thanks a lot.
Juggernaut
06-16-2011, 04:49 AM
Profiles are messed up when mod is uninstalled.
Tried disabling plugins and when process_templates_complete is disabled is when the profiles get messed up.
PD: I'm running vbulletin 4.1.4 on my board
galerio
06-16-2011, 06:05 AM
Try to flush your cache (browser cache and server cache), this plugin doesn't touch in any way your template, so when you disable it, you return to the original state.
Juggernaut
06-17-2011, 12:32 AM
I tried what you said, but the issue is not fixed by flushing the cache. Only the profiles that have been modified are affected, unmodified profiles are not affected. Can you look into this, I had to unistalled because the location of the footer link does not look good with my footer.
galerio
06-17-2011, 11:35 AM
The footer link can be removed, I don't require to keep it.
To remove the copyright info just disable the plugin for footer link:
go to Plugins & Products->Plugin Manager and search the plugins for Gravatar as Default Avatar and delete or disable the one named "Profile Hooks".
About your issue, can you give me a link to your forum?
As already said, this product doesn't add anything to your database or server, it's a simple function that calls a gravatar link when the avatar link is empty, but it does it on the fly. So no profile attribute is modified
Juggernaut
06-18-2011, 03:13 AM
Link to one of the affected profiles sent in a private message. :)
Juggernaut
06-18-2011, 04:28 PM
Issue has been resolved, it was not the gravatar plugin causing problems with my profiles but a template edit.
galerio
07-31-2011, 09:40 AM
Updated the manual modification for VB 4.1.5
nacaruncr
07-31-2011, 09:45 AM
ohhhh awesome man :D thanks :D
installed + tagged + motm + 5 stars :D
thanks :D
Zohhak
08-05-2011, 01:08 PM
Can you give Support for adding gravatars to CMS-Widgets like "Recent Posts/Threads", too?
IMO it's to inconsistent, as it is now. Hopefully you find a way to automatically add gravatars to the templates, soon.
greets Zohhak
galerio
08-05-2011, 01:53 PM
@Zohhak I'm sorry, but there are no template-hook to automatically insert gravatar in CMS-blog/widget.
And then, blog and cms uses another system to call avatars. I need to work on it, but it will be another manual file edit. I'm sorry, I'd like to have gravatar everywhere too.
ryiinn
08-17-2011, 12:50 AM
Great plug-in! Is there any way for me to specify a custom default gravatar when users don't have one (instead of using the Gravatar default monsters/blank guy/etc.)?
cavyspirit
08-17-2011, 03:15 AM
I think this mod is more than I want, but I'm not sure.
I have about 40 avatars that a user can pick from if they don't have their own.
All I really, really want, is if a user doesn't pick one nor upload one of their own, that the system would assign one of my 40 at random. It seems like it should be an easy thing.
On my pet forum, I require avatars to be of an appropriate pet, so pulling in gravatars is not what I want.
Thanks!
galerio
08-17-2011, 05:43 AM
@ryiin No, there isn't this option. This is out of the scope of gravatar plugin, so you need to find other plugins that do it or modify the xml of mine and substitute the url that calls the gravatar with the url of an image you want.
@cavyspirit This plugin calls a gravatar, and every gravatar is unique. If you assign an avatar of your 40, then there will be many users with the same avatar. Anyway, you can't do it with my plugin, I'm sorry. It's out of its scope.
lodos0677
08-27-2011, 05:34 PM
ınstalled.Thanks.
nCODE
09-11-2011, 05:00 AM
Hello, found some error:
Avatars doesn't show up in the "View Forum Leaders" (showgroups.php) and in the groups section...
galerio
09-11-2011, 08:20 AM
It is not an error, I haven't considered them.Thanks for reporting, I'll try to add gravatar also there.
mindhunter77
10-21-2011, 07:09 PM
There seems to be a bug,
This did not happen when I initially installed this, but it started happening today, maybe Gravatar changed something?
When this mod is enabled on my forum, it causes quick replay to throw a "Do you want to leave this page, or stay on this page" for everyone using the quick reply.
I had to go one by one and through my mods disabling them until I found it was this one.
Someone else said that it may also show do to a mix of http and https in the url that is being pulled from gravatar, though I don't know that to be true.
galerio
10-21-2011, 08:05 PM
The url of gravatars are all http, so if your forum is on https it can be a problem.
Please, try this attached version (import and overwrite). It uses the https for gravatar images (from http://www.gravatar.... to https://secure.gravatar...)
Please, let me know if it works.
galerio
11-29-2011, 02:14 PM
Update for VB 4.1.8 and HTTPS version added for those boards that use https protocol.
kpuls
11-30-2011, 02:48 AM
Can you give Support for adding gravatars to CMS-Widgets like "Recent Posts/Threads", too?
IMO it's to inconsistent, as it is now. Hopefully you find a way to automatically add gravatars to the templates, soon.
Galerio,
Thanks for the update today, and I'd like to second a vote for this. :)
Don't know if it helps, but the CMS widget for recent articles pulls from the following template: vbcms_widget_recentarticle_page
I'm just not sure what to edit there to implement the Gravatar call. If you could help with that one, I could try and roll it into the others and post back on the mods that need to be made.
galerio
11-30-2011, 06:48 AM
Thanks kplus, I'll take a look into it.
kfyonur
11-30-2011, 09:46 AM
Good mod,thanx
WebiMax
12-20-2011, 08:20 PM
Works great, waiting on the automatic entries and CMS support, thanks for you help.
jorgejgm
01-22-2012, 10:16 AM
Thank you. Work fine.
Small problem.
The path of the image in the facebook application is incorrect because the domain of forum is added to the route of gravatar.
Example. In app facebook the path of the image is:
http://myforumvbulletin.comhttps://secure.gravatar.com/avatar/XXXXXXXX
Any solution?
Thank you very much
galerio
01-22-2012, 04:31 PM
@jorgejgm can you give more details? I can't understand the refering about facebook application. Can you give me an example link? (you can do it also in PM).
I have tried to login to your forum using the facebook connect, and I can see a regular gravatar in my profile, so I cannot see your problem.
jorgejgm
01-22-2012, 05:48 PM
Thank you Galerio. Send PM.
Facebook app of vbulletin https://www.vbulletin.com/index.php?do=facebookapp (I explained very bad, sorry)
galerio
01-22-2012, 07:02 PM
Thank you, I have seen the issue, but I don't have the Vbulletin Facebook App, so I can't see its source code and look for a solution. And I'm not going to purchase it by now. I'm sorry, but I can't give you support.
jorgejgm
01-25-2012, 05:23 PM
Thanks Galerio. A shame.
jorgejgm
01-25-2012, 05:40 PM
solved
In user_info.php (apps facebook)
Find: return vB_SITE_ROOT . (!empty($this->vb_avatarurl) ? $this->vb_avatarurl : 'images/misc/unknown.gif');
and replace by:
return (!empty($this->vb_avatarurl) ? $this->vb_avatarurl : 'HTTP://YOURFORUM.XXX/images/misc/unknown.gif');
chikuru
02-26-2012, 04:11 AM
Is this compatible with vb 4.1.10?
Thanks!
galerio
02-26-2012, 09:01 AM
Yes it is, maybe I just need to update infos in txt file if you want gravatar also in sidebar and blog/cms, but it's a simple thing to do. I'll do it now.
Edit: added updated version compatible with 4.1.10
Kraxell
03-01-2012, 03:37 PM
Mhm...not very effective because after every update the changes are lost. Is it possible to do that with templates?
galerio
03-01-2012, 04:12 PM
Sorry, but there's no way to alter avatars in sidebar and blogs with a template change. It's something hardcoded in the source files.
But the avatars in showpost, profile and memberlist are already there also after an update.
w8baby
03-02-2012, 06:30 PM
tried the edits in vb 4.1.11. works perfectly :). had to wait 5-10min for it to update sidebar
galerio
03-02-2012, 06:59 PM
You should clean the sidebar block cache. Or wait for some hours.
postcd
04-08-2012, 08:01 AM
Please can you make this mod so user can select from my custom avatars, nto gravatars (just adding another option in Mod config so i can set manually path to images.. (my def avatars directory)
thank you
galerio
04-08-2012, 08:25 AM
I can't understand you. You mean an option to let users to disable gravatars so that their avatar will be choosen from your custom images in your avatar directory?
So, for example, I didn't select an avatar on your board, so the avatar is choosen randomly from a directory of your images on your server. Is this what you are asking for?
If so, this is not possible with my mod.
postcd
04-09-2012, 06:18 AM
That is a bullshit, everything is possible when you want, this would substantially improve the mod. Better to say you dont want to make it, rather than saying bullshit like that you dont understand and its not possible in this mod.
galerio
04-09-2012, 08:06 AM
That is a bullshit, everything is possible when you want, this would substantially improve the mod. Better to say you dont want to make it, rather than saying bullshit like that you dont understand and its not possible in this mod.
Ahah! So I've understood well what you mean, right?
Definitly, what you are asking for is a complete different mod. I haven't the skill to do it. So, take some book about php, sql and html, learn it, and then do it by yourself. And don't waste my time offending me. Ok guy? I've made this mod for free, I don't want to use all my time to make just you happy. So don't pretend what you can't.
postcd
04-10-2012, 05:11 PM
Im not pretending, maybe You do. It is your thing, im just saying that what im wanting is making the script pick random avatar image from my vb forum folder and that many members would welcome this possibility. I just dont like saying "it is not possible in my Mod", you should say that you dont have time or you think it is not good idea. :-)
ru55ian
06-15-2012, 08:10 PM
did anyone notice it stopped working as of today for some reason. I mean yesterday it was working and today instead of gravatar, just link shows up to the member's page.
galerio
06-15-2012, 08:28 PM
On my forum it is still working.
Sorry, I'm very busy and I haven't installed 4.2 yet, so if the problem is related to the latest version of VB I need to do tests, but I can't do it now. Please, be patient.
Thanks
ru55ian
06-16-2012, 12:46 AM
gravatar.com was down.... now it's back up and plugin started working again :-)
arrarrgee
06-16-2014, 02:39 AM
Thanks Galerio. Works like a charm on 4.2.2
arrarrgee
06-21-2014, 01:47 AM
Could someone please tell me the names of php to be edited to replicate the same changes for avatars in the main forum page and list of threads in a forum as well..
Thx
arr
arrarrgee
06-24-2014, 08:10 AM
anyone...help pls.....
tim.liton
11-30-2015, 01:46 PM
This is not working on 4.2.3. Shows no errors on installation but the gravatars are broken.
edit: fixed by changing 404 to retro. But, the digitalpoint avatars are not working now. They show blank.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.