Default Avatar

Styles, Theme, Cosmetic and Appearance related tips, tricks, tweaks, and Graphics

Moderator: STG Styles Team

Forum rules
NOTE: Post full styles only in the Styles Forum

Default Avatar

Postby Stoker » 08 Feb 2008, 06:00

Hello :hello:

This is a guide to get a default avatar for users that have not choosen one.
Nothing fancy like ACP control, just 1 edit per style.

Prosilver:
Open prosilver/template/viewtopic_body.html
Find:
Code: Select all
<!-- IF postrow.POSTER_AVATAR -->
               <!-- IF postrow.U_POST_AUTHOR --><a href="{postrow.U_POST_AUTHOR}">{postrow.POSTER_AVATAR}</a><!-- ELSE -->{postrow.POSTER_AVATAR}<!-- ENDIF --><br />
            <!-- ENDIF -->


Replace with:
Code: Select all
<!-- IF postrow.POSTER_AVATAR -->
               <!-- IF postrow.U_POST_AUTHOR --><a href="{postrow.U_POST_AUTHOR}">{postrow.POSTER_AVATAR}</a><!-- ELSE -->{postrow.POSTER_AVATAR}<!-- ENDIF --><!-- ELSE --><img src="{T_THEME_PATH}/images/no_avatar.gif" width="90" height="90" alt="" />
                             <!-- ENDIF --><br />



Subsilver2:
Open subsilver2/template/viewtopic_body.html
Find:
Code: Select all
<!-- IF postrow.POSTER_AVATAR -->
                                <tr>
                                        <td>{postrow.POSTER_AVATAR}</td>
                               </tr>
                        <!-- ELSE -->
                               <tr>
                                        <td><img src="{T_THEME_PATH}/images/no_avatar.gif" width="90" height="90" alt="" /></td>
                               </tr>
                        <!-- ENDIF -->


That is that :)
PhpBB3 has standard avartars. This i the one we use here.
If You want Your own Default Avatars, just upload them to name of your style/theme/images and call them no_avatar.gif
If the Avatar has another size than 90 x 90 make sure to edit the width and height in above code.
Last edited by Stoker on 24 Jun 2008, 23:54, edited 4 times in total.
Stoker
Stoker    
Borg Drone
Borg Drone
 
Posts: 401
Joined: 24 Nov 2007, 11:05
Location: Denmark
Favorite Team: Highslide JS
Gender: Male
phpBB Knowledge: 4


Re: Default Avatar

Postby stitch626 » 08 Feb 2008, 20:03

Can't this already be done by assigning an avatar to the registered user group? I have been doing this on my board since RC1 and each time a new user registers they get assigned that avatar until they change it.
User avatar
stitch626    
STG Moderator Leader
STG Moderator Leader
 
Posts: 3185
Joined: 08 Feb 2007, 20:47
Location: Michigan
Favorite Team: Detroit Red Wings
Gender: Male
phpBB Knowledge: 7

Re: Default Avatar

Postby Sniper_E » 08 Feb 2008, 22:38

Yes Stoker, what Stitch says is true. This may be an unapproved mod/tip.
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 7003
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

Re: Default Avatar

Postby Highway of Life » 08 Feb 2008, 22:43

Mike, will giving the registered user group an Avatar half-way through your board life erase the avatars of the users and replace it with the newly assigned *default* avatar?
This used to be the case, but I don?t remember if they fixed it. :unsure:
Watch out! I might do a code wheelie!

User avatar
Highway of Life    
STG Jedi Master
STG Jedi Master
 
Posts: 10458
Joined: 08 May 2006, 05:23
Location: Beware of Programmers carrying screwdrivers
Gender: Male
phpBB Knowledge: 10

Re: Default Avatar

Postby stitch626 » 08 Feb 2008, 23:01

Highway of Life wrote:Mike, will giving the registered user group an Avatar half-way through your board life erase the avatars of the users and replace it with the newly assigned *default* avatar?

This used to be the case, but I don?t remember if they fixed it. :unsure:

Yes. This is correct...
Last I knew this was the case. I haven't done it since RC1. I will have to try it out on my testboard and see if this still happens.
User avatar
stitch626    
STG Moderator Leader
STG Moderator Leader
 
Posts: 3185
Joined: 08 Feb 2007, 20:47
Location: Michigan
Favorite Team: Detroit Red Wings
Gender: Male
phpBB Knowledge: 7

Re: Default Avatar

Postby Stoker » 09 Feb 2008, 01:48

I know what You mean.
Assigning a default avatar to an group can only be done with success in a complete fresh board with no users.
Actually I have done this on my own board and had to apologize to all my users that their allready choosen avatar got lost :blackeye:
(Their avatar got lost and was replaced with the new default avatar)

However if it is not a fresh board the description I have provided will do the trick without replacing existing avatars.
Stoker
Stoker    
Borg Drone
Borg Drone
 
Posts: 401
Joined: 24 Nov 2007, 11:05
Location: Denmark
Favorite Team: Highslide JS
Gender: Male
phpBB Knowledge: 4

Re: Default Avatar

Postby stitch626 » 09 Feb 2008, 17:18

Well, then this is a good mod to have then because I did a test on a fresh install last night and the users selected avatar will be replaced if you choose a default.

I may have to try this one out if I decide to switch the default avatar on my board.

Way to go Stoker :thumbsup:
User avatar
stitch626    
STG Moderator Leader
STG Moderator Leader
 
Posts: 3185
Joined: 08 Feb 2007, 20:47
Location: Michigan
Favorite Team: Detroit Red Wings
Gender: Male
phpBB Knowledge: 7

Re: Default Avatar

Postby Highway of Life » 09 Feb 2008, 18:17

Which reminds me I need to make a feature request for 3.2. :twisted:
It would be great if there was an option/checkbox, replace all users avatars: yes/no. On assigning group avatar.
Alternatively, someone should create a MOD that would allow a user to give a group an avatar without overwriting the users avatars.
Watch out! I might do a code wheelie!

User avatar
Highway of Life    
STG Jedi Master
STG Jedi Master
 
Posts: 10458
Joined: 08 May 2006, 05:23
Location: Beware of Programmers carrying screwdrivers
Gender: Male
phpBB Knowledge: 10

Re: Default Avatar

Postby stitch626 » 09 Feb 2008, 22:44

Highway of Life wrote:Which reminds me I need to make a feature request for 3.2. :twisted:
It would be great if there was an option/checkbox, replace all users avatars: yes/no. On assigning group avatar.
Alternatively, someone should create a MOD that would allow a user to give a group an avatar without overwriting the users avatars.

This almost seems as if this was an oversight. That is a very good suggestion David. I hope they implement this.
User avatar
stitch626    
STG Moderator Leader
STG Moderator Leader
 
Posts: 3185
Joined: 08 Feb 2007, 20:47
Location: Michigan
Favorite Team: Detroit Red Wings
Gender: Male
phpBB Knowledge: 7

Re: Default Avatar

Postby CitLemBiK » 12 Feb 2008, 20:51

For memberlist_view.html

ON SUBSILVER

FIND

Code: Select all
         <!-- IF AVATAR_IMG -->
            <tr>
               <td align="center">{AVATAR_IMG}</td>
            </tr>


ADD AFTER

Code: Select all
            <!-- ELSE -->
               <tr>
               <td><img src="{T_THEME_PATH}/images/avatar_yok.gif" width="150" height="150" alt="" /></td>
               </tr>


:grin: :grin: :grin:
User avatar
CitLemBiK    
Cadet IV
Cadet IV
 
Posts: 40
Joined: 15 Oct 2007, 03:55
Gender: Female

Next

Return to Styles Tweaks, Tips and Graphics

Who is online

Users browsing this forum: MSNbot Media and 4 guests