Admin Extra Discussions  

Go Back   Admin Extra Discussions > Resources > Tutorials > IPB Tutorials


Some Details: Posted by Azhria Lilu on 17-02-2010 (07:09 PM), last reply was on 16-07-2010 (06:07 PM). This thread has received 7 replies and been viewed 556 times.

Reply
 
LinkBack Thread Tools
Set a default Avatar for your members
Old 17-02-2010, 07:09 PM   #1 (permalink)
Set a default Avatar for your members
Azhria Lilu Azhria Lilu is offline 17-02-2010, 07:09 PM

Author of thread
Here on AdX, when a member registers, it automatically adds a default avatar to their accounts until they wish to upload their own. This is also achievable on IPB so I thought I'd show you how.

Open core.php - found in admin/sources/base/
Find:

<?PHP Code

else if( ipsRegistry::$settings['allow_gravatars'] )
        {
            
/* Try a gravatar, if all else fails */
            
$av_hash  md5$member['email'] );
            
$s        $lowestSize "&amp;s={$lowestSize}" '';
            
$blank_av urlencode(ipsRegistry::$settings['avatars_url'] . '/blank_avatar.gif' ); 

            return 
"<img src='http://www.gravatar.com/avatar/{$av_hash}?d={$blank_av}{$s}' alt='' />";
        } 

Add beneath:-

<?PHP Code

return "<img src='" ipsRegistry::$settings['avatars_url'] . '/blank_avatar.gif' "' alt='' />"

Upload the avatar you wish to use (you can find some here at AdX - Blank Avatars (PSD + PNG) ) to your forums public/style_avatars/ directory and name it 'blank_avatar.gif', overwriting the file that's there.

And there you have it!
__________________
I know violence isn't the right answer - I got it wrong on purpose!
Admin Extra Information | Member Features
Admin Extra - the switzerland of Forum Administration sites!
It's a Book Blog - Reading, Reviews, Writing!

Azhria Lilu
heh heh heh
 Azhria Lilu's Avatar
Views: 556
Reply With Quote
Re: Set a default Avatar for your members
Old 17-02-2010, 07:29 PM   #2 (permalink)
Code Monkey
 
KW802's Avatar
 
Default Re: Set a default Avatar for your members

[slightly offtopic]The bit of code caught my attention.... using Gravatars is a stock feature of IPB?[/slightly offtopic]
KW802 is offline   Back to Index Reply With Quote
Re: Set a default Avatar for your members
Old 17-02-2010, 07:40 PM   #3 (permalink)
heh heh heh
 
Azhria Lilu's Avatar
 
Send a message via MSN to Azhria Lilu
Author of thread
Default Re: Set a default Avatar for your members

Looks that way lol this was how I was shown to do it, so I just copied and pasted the relevant part of the source code from the file.
__________________
I know violence isn't the right answer - I got it wrong on purpose!
Admin Extra Information | Member Features
Admin Extra - the switzerland of Forum Administration sites!
It's a Book Blog - Reading, Reviews, Writing!
Azhria Lilu is offline   Back to Index Reply With Quote
Re: Set a default Avatar for your members
Old 17-02-2010, 08:20 PM   #4 (permalink)
93and99
 
Noles's Avatar
 
Send a message via MSN to Noles
Default Re: Set a default Avatar for your members

“ Originally Posted by KW802 View Post

[slightly offtopic]The bit of code caught my attention.... using Gravatars is a stock feature of IPB?[/slightly offtopic]
Yes.
__________________
Noles is online now   Back to Index Reply With Quote
Re: Set a default Avatar for your members
Old 18-02-2010, 11:28 AM   #5 (permalink)
ADX Dungeon Master
 
Wizzard's Avatar
 
Default Re: Set a default Avatar for your members

Hmm going to cause a few problems if the gravatar site has a glitch, or does it throw up a no avatar avatar if gravatar cannot be contacted?
Wizzard is offline   Back to Index Reply With Quote
Re: Set a default Avatar for your members
Old 18-02-2010, 11:58 AM   #6 (permalink)
heh heh heh
 
Azhria Lilu's Avatar
 
Send a message via MSN to Azhria Lilu
Author of thread
Default Re: Set a default Avatar for your members

I think the gravatar is an available option, but not the only option in IPB.
__________________
I know violence isn't the right answer - I got it wrong on purpose!
Admin Extra Information | Member Features
Admin Extra - the switzerland of Forum Administration sites!
It's a Book Blog - Reading, Reviews, Writing!
Azhria Lilu is offline   Back to Index Reply With Quote
Re: Set a default Avatar for your members
Old 12-05-2010, 09:00 AM   #7 (permalink)
Junior Member
 
MrTheMaroc's Avatar
 
Send a message via MSN to MrTheMaroc Send a message via Yahoo to MrTheMaroc Send a message via Skype™ to MrTheMaroc
Default Re: Set a default Avatar for your members

Thank you
MrTheMaroc is offline   Back to Index Reply With Quote
Re: Set a default Avatar for your members
Old 16-07-2010, 06:07 PM   #8 (permalink)
Senior Member
 
Michael's Avatar
 
Send a message via MSN to Michael
Default Re: Set a default Avatar for your members

Im going to try this now, we dont have gravatars turned on so this should be great as a default no avatar. Thanks
__________________
Message Boards & Forum Directory - 10,000 plus posts forums, 100% free!
Teen Forums - YouTube Backgrounds

Michael is offline   Back to Index Reply With Quote
Reply

Bookmarks

Tags
avatar, default, members, set

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[REQ] Avatar merk_sfi Graphic Requests 0 09-02-2010 07:35 AM
Avatar Remake Steve M Graphic Requests 12 16-01-2010 11:50 PM




All times are GMT. The time now is 08:53 AM.
Search Engine Optimization by vBSEO 3.3.2
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Admin Extra 2010
Style & Imagery copyrighted to adminextra.com



adminextra Top