Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
[1e2] Gravatar as Default Avatar for users without image: auto generate random avatar Details »»
[1e2] Gravatar as Default Avatar for users without image: auto generate random avatar
Version: 1.1.2.p3, by galerio galerio is offline
Developer Last Online: Feb 2019 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 4.x.x Rating:
Released: 04-17-2011 Last Update: 02-25-2012 Installs: 97
Uses Plugins Template Edits Auto-Templates
Code Changes  
No support by the author.

With this very sipmple plugin you can display a Gravatar 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!





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.
  • mm: (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.
  • identicon: a geometric pattern based on an email hash. But if an user has its own avatar saved on gravatar.com, that image is displayed.
  • monsterid: a generated 'monster' with different colors, faces, etc. But if an user has its own avatar saved on gravatar.com, that image is displayed.
  • wavatar: generated faces with differing features and backgrounds. But if an user has its own avatar saved on gravatar.com, that image is displayed.
  • retro: 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 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.


vBulletin 3.8 version, please, download HERE

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

Download Now

File Type: zip 1e2.it gravatar_as_default-https-v1.1.2.p3 for 4.1.10.zip (3.3 KB, 94 views)
File Type: zip 1e2.it gravatar_as_default-v1.1.2.p3 for 4.1.10.zip (3.2 KB, 265 views)

Screenshots

File Type: png 1gravatar.png (10.1 KB, 0 views)
File Type: png av-memberlist.png (14.0 KB, 0 views)
File Type: jpg avat-cpanel.jpg (103.2 KB, 0 views)
File Type: jpg 2011-06-08_114449.jpg (24.3 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 04-24-2011, 12:46 AM
ru55ian's Avatar
ru55ian ru55ian is offline
 
Join Date: May 2007
Location: Canada
Posts: 94
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

awesome, works in 3.8.7 Thanks
Reply With Quote
  #13  
Old 04-24-2011, 09:14 AM
galerio's Avatar
galerio galerio is offline
 
Join Date: Feb 2011
Location: Italy
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@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?
Reply With Quote
  #14  
Old 04-25-2011, 10:14 PM
galerio's Avatar
galerio galerio is offline
 
Join Date: Feb 2011
Location: Italy
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just a small update to menu option to prevent admin to write wrong options.
Reply With Quote
  #15  
Old 04-26-2011, 06:08 PM
thespi thespi is offline
 
Join Date: Oct 2010
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Really good work!
Reply With Quote
  #16  
Old 05-13-2011, 10:45 PM
karlm's Avatar
karlm karlm is offline
 
Join Date: Jul 2006
Location: England
Posts: 447
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #17  
Old 05-13-2011, 11:40 PM
karlm's Avatar
karlm karlm is offline
 
Join Date: Jul 2006
Location: England
Posts: 447
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ps - this doesn't work on the blogs nor the CMS area

Hope you can update accordingly )
Reply With Quote
  #18  
Old 05-14-2011, 07:52 AM
galerio's Avatar
galerio galerio is offline
 
Join Date: Feb 2011
Location: Italy
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #19  
Old 06-08-2011, 08:41 AM
galerio's Avatar
galerio galerio is offline
 
Join Date: Feb 2011
Location: Italy
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #20  
Old 06-15-2011, 10:09 AM
Jim Westergren Jim Westergren is offline
 
Join Date: Jun 2006
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Warning!!

This plugin contains the following code:

PHP 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.
Reply With Quote
  #21  
Old 06-15-2011, 10:43 AM
Jim Westergren Jim Westergren is offline
 
Join Date: Jun 2006
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The plugin is also missing code to add the gravatars to the sidebar ...
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:53 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08890 seconds
  • Memory Usage 2,351KB
  • Queries Executed 28 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (6)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete