Avatar for zero posters

This forum is now closed as part of retiring phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
DivErTido
Registered User
Posts: 642
Joined: Fri Aug 08, 2003 10:11 pm
Contact:

Avatar for zero posters

Post by DivErTido »

It´s any MOD out there to make possible to give an avatar of our choice to all members that have zero posts? :wink:
P.S. Please sorry for my poor english...
Legendas Divx
porplemontage
Registered User
Posts: 15
Joined: Sun Oct 10, 2004 3:48 am

Post by porplemontage »

There's a Default Avatar hack, similar to your request.
[porplemontage studios]
>>internet entertainment
DivErTido
Registered User
Posts: 642
Joined: Fri Aug 08, 2003 10:11 pm
Contact:

Post by DivErTido »

Hi already have this hack installed... but this only give a default avatar for new members and for guests... I need for all zero posters ;)
P.S. Please sorry for my poor english...
Legendas Divx
Joe Belmaati
Registered User
Posts: 2110
Joined: Sun Sep 28, 2003 7:35 pm
Location: Denmark

Post by Joe Belmaati »

The only place that I can think of that this would be relevant is in view profile.

OPEN includes/usercp_viewprofile.php

FIND

Code: Select all

$poster_rank = '';
BEFORE, ADD

Code: Select all

$avatar_img = ( $profiledata['user_posts'] == 0 ) ? '<img src="' . $board_config['avatar_path'] . '/' . 'youravatar.jpg" alt="" border="0" />' : $avatar_img;
Alternatively you can run a query on your db from time to time setting all zero posters to a certain avatar.

Code: Select all

UPDATE phpbb_users SET user_avatar = 'youravatar.jpg' WHERE user_posts = 0;
Image
DivErTido
Registered User
Posts: 642
Joined: Fri Aug 08, 2003 10:11 pm
Contact:

Post by DivErTido »

Thank youuuuuuuu Joe Belmaati :D:D:D
But the mod don´t work...
I put this where you say:

Code: Select all

$avatar_img = ( $profiledata['user_posts'] == 0 ) ? '<img src="' . $board_config['avatar_path'] . '/' . 'http://www.domain.com/images/image.jpg" alt="" border="0" />' : $avatar_img;
and try to put:

Code: Select all

$avatar_img = ( $profiledata['user_posts'] == 0 ) ? '<img src="' . $board_config['avatar_path'] . '/' . 'images/image.jpg" alt="" border="0" />' : $avatar_img;
What I do wrong? :)
P.S. Please sorry for my poor english...
Legendas Divx
Joe Belmaati
Registered User
Posts: 2110
Joined: Sun Sep 28, 2003 7:35 pm
Location: Denmark

Post by Joe Belmaati »

Ahh, OK. I thought you wanted an existing avatar, i.e one from your avatar directory. Instead, use this:

Code: Select all

$avatar_img = ( $profiledata['user_posts'] == 0 ) ? '<img src="http://www.domain.com/images/image.jpg" alt="" border="0" />' : $avatar_img; 
Image
DivErTido
Registered User
Posts: 642
Joined: Fri Aug 08, 2003 10:11 pm
Contact:

Post by DivErTido »

I try this and is working:

Code: Select all

$avatar_img = ( $profiledata['user_posts'] == 0 ) ? '<img src="' . 'http://www.domain.com/images/image.jpg" alt="" border="0" />' : $avatar_img;
It is correct? :)

Thanks alot Joe Belmaati !!! Really! :D
P.S. Please sorry for my poor english...
Legendas Divx
Joe Belmaati
Registered User
Posts: 2110
Joined: Sun Sep 28, 2003 7:35 pm
Location: Denmark

Post by Joe Belmaati »

Code: Select all

' . '
You don't need this.
Image
DivErTido
Registered User
Posts: 642
Joined: Fri Aug 08, 2003 10:11 pm
Contact:

Post by DivErTido »

I already changed to the last code that you put here! :D
Thanks again 8)
P.S. Please sorry for my poor english...
Legendas Divx
Joe Belmaati
Registered User
Posts: 2110
Joined: Sun Sep 28, 2003 7:35 pm
Location: Denmark

Post by Joe Belmaati »

Glad it works.
Joe
Image
DivErTido
Registered User
Posts: 642
Joined: Fri Aug 08, 2003 10:11 pm
Contact:

Post by DivErTido »

Hey Joe Belmaati or someone :)
It´s possible to do the same thing in memberlist with this MOD:

Code: Select all

######################################################## 
##
## Mod Title:   Avatar in memberlist 
## Mod Version: 1.0.0
## Author:      Kenny aka Gordon (http://kdg.fm.pri.ee/)
##
## Description:  
## This mod will add user's avatar to the memberlist
## if the user has specified it in his/her profile.

## It was designed for PHPBB 2.0+
## 
## Installation Level:  Easy as hell! 
## Installation Time:   pretty short 
##
########################################################

// Directions: -----------------------------------------

› Open /templates/themename/memberlist_body.tpl

Find: >>>
 <th class="thCornerR" nowrap="nowrap">{L_WEBSITE}</th>
After add: >>>
 <th class="thCornerR" nowrap="nowrap">Avatar</th>
 

Find: >>>
 <td class="{memberrow.ROW_CLASS}" align="center">&nbsp;{memberrow.WWW_IMG}&nbsp;</td>
After add: >>>
 <td class="{memberrow.ROW_CLASS}" align="center">&nbsp;{memberrow.AVATAR_IMG}&nbsp;</td>
 
 
Find: >>>
 <td class="catbottom" colspan="9"
NOTE: if u have installed other hacks that modify the memberlist, there could be different nunber (not 9)
Replace with: >>>
 <td class="catbottom" colspan="10"
 


› Open /memberlist.php

Find: >>>
 $www = ( $row['user_website'] ) ? '<a href="' . $row['user_website'] . '" target="_userwww">' . $lang['Visit_website'] . '</a>' : '';
After add: >>>
 $avatar_img = ($row['user_avatar'] && $row['user_avatar_type']==2 ? '<img src=' . $row['user_avatar'] . '>' : ($row['user_avatar'] && $row['user_avatar_type']==3 ? '<img src=images/avatars/gallery/' . $row['user_avatar'] . '>' : false));
 
 
Find: >>>
 'WWW' => $www,
After add: >>>
 'AVATAR_IMG' => $avatar_img,
P.S. Please sorry for my poor english...
Legendas Divx
DivErTido
Registered User
Posts: 642
Joined: Fri Aug 08, 2003 10:11 pm
Contact:

Post by DivErTido »

*BUMP* :)
P.S. Please sorry for my poor english...
Legendas Divx
DivErTido
Registered User
Posts: 642
Joined: Fri Aug 08, 2003 10:11 pm
Contact:

Post by DivErTido »

Anyone?
P.S. Please sorry for my poor english...
Legendas Divx
DivErTido
Registered User
Posts: 642
Joined: Fri Aug 08, 2003 10:11 pm
Contact:

Post by DivErTido »

BUMP :roll:
P.S. Please sorry for my poor english...
Legendas Divx
Professor Piggy
Registered User
Posts: 36
Joined: Thu Nov 03, 2005 8:10 pm

Post by Professor Piggy »

Surely this would be pointless as you wouldn't be able to see an avatar of someone with 0 posts!
Post Reply

Return to “[2.0.x] MOD Requests”