Welcome to PhpBB3 BBCodes. Click here to register.

Default Avatar

Guides, Tutorials, Tips & Tricks for phpBB3
Use this forum to post Your Guides
Forum rules
You are only allowed to post Your own guides, tips & tricks in this forum.
When You post here, you are committed to give support when needed.
Guides, tips & tricks that are not supported will be removed.

Default Avatar

Postby Stoker 07 Sep 2008, 14:51

Default Avatar

Author: Stoker
Description: PhpBB3 Default Avatar adds a default avatar to users that have not choosen one.
Only 1 edit per style

I will advice you to install this mod instead: Universal No Avatar
Its much better than my codechanges :biggrin:





Instructions:
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>
         <!-- ENDIF -->


Replace with:
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 -->


Save, upload and refresh templates.
Kind regards
Stoker

I don't give PM support, but feel free to contact me with suggestions etc.
User avatar
Stoker

Site Admin
 
Age: 35
Posts: 1946
Joined: 12 May 2008, 15:26
Location: Odense, Denmark
Highscores: 47
BBCodes: 250+
Real Name: Ulrik
Alias: Stokerpiller


User avatar Site Admin
Offline


Doing some testing


Re: Default Avatar

Postby fl0o 22 Sep 2008, 12:09

Hi stoker... a user asked me if this works in AcidTech.
[Phpbb3 BBcode]: phpbb3-bbcodes.html
[Video BBCodes]: phpbb3-video-bbcodes.html
[Mod BBCodes]: phpbb3-mod-bbcodes.html
User avatar
fl0o

BBCode Supporter
 
Age: 18
Posts: 255
Joined: 27 Jun 2008, 19:47
Location: Romania, Galaţi
Highscores: 67
BBCodes: 7-8
Real Name: Florin
Alias: liquid

Re: Default Avatar

Postby Stoker 22 Sep 2008, 12:23

Hi Fl0o

It should work, I just dont know if Acidtech is subsilver based?
It its not based on subsilver or prosilver there might be problems.

But the edits are easy, so ask him to test and remember backup.
Kind regards
Stoker

I don't give PM support, but feel free to contact me with suggestions etc.
User avatar
Stoker

Site Admin
 
Age: 35
Posts: 1946
Joined: 12 May 2008, 15:26
Location: Odense, Denmark
Highscores: 47
BBCodes: 250+
Real Name: Ulrik
Alias: Stokerpiller


User avatar Site Admin
Offline


Doing some testing

Re: Default Avatar

Postby Lucian_rider 28 Nov 2008, 16:28

Was this section supposed to automatically insert the correct path to the avatar file once the avatar file was copied to the images folder:
{T_THEME_PATH}/images/no_avatar.gif

I tried /images/ and I tried /styles/prosilver/imageset and a number of other path combination's and could not get it to work. Finally I inserted the entire path from the root to the file leaving out the {T_THEME_PATH} and then it worked...
User avatar
Lucian_rider

BBCoder II
 
Age: 46
Posts: 46
Joined: 25 Aug 2008, 01:06
Location: St. Lucia, West Indies
Real Name: Chris

Re: Default Avatar

Postby Stoker 28 Nov 2008, 18:26

Lucian_rider wrote:Was this section supposed to automatically insert the correct path to the avatar file once the avatar file was copied to the images folder:
{T_THEME_PATH}/images/no_avatar.gif

I tried /images/ and I tried /styles/prosilver/imageset and a number of other path combination's and could not get it to work. Finally I inserted the entire path from the root to the file leaving out the {T_THEME_PATH} and then it worked...


In a standard phpbb3 instalation there is place a gif named no_avatar.gif in root/styles/theme_name/theme
This modification uses this file.

However there is a new mod at phpbb.com called no Avatar. Its much better: http://www.phpbb.com/community/viewtopi ... 15&start=0
Kind regards
Stoker

I don't give PM support, but feel free to contact me with suggestions etc.
User avatar
Stoker

Site Admin
 
Age: 35
Posts: 1946
Joined: 12 May 2008, 15:26
Location: Odense, Denmark
Highscores: 47
BBCodes: 250+
Real Name: Ulrik
Alias: Stokerpiller


User avatar Site Admin
Offline


Doing some testing

Re: Default Avatar

Postby Lucian_rider 29 Nov 2008, 04:53

I just gave that one a try, yes it is a bit better because the avatar shows up in the users profile. Thanks for the tip!
User avatar
Lucian_rider

BBCoder II
 
Age: 46
Posts: 46
Joined: 25 Aug 2008, 01:06
Location: St. Lucia, West Indies
Real Name: Chris


Return to Guides, Tutorials, Tips & Tricks



Who is online

Users browsing this forum: No registered users and 0 guests