Page 1 of 2

[2.0.20] Avatar Check

Posted: Sun Apr 16, 2006 7:18 pm
by Extensions Robot
MOD Name: Avatar Check
Author: Kieran007
MOD Description: This MOD checks the URL of users external avatars to see if they can be loaded. If the server is down or the image doesn't exist, then a "default" avatar is loaded in its place. This prevents slow loading of forum pages when user(s) avatar(s) don't load, as well as dead image icons.


MOD Version: 1.0.0

Download File: avatar_check_mod.zip
mods overview page: View
File Size: 24808 Bytes

Security Score: 0

Support for this MOD needs to be asked within this topic. The phpBB Teams are not responsible or required to give anyone support for this MOD. By installing this MOD, the phpBB Support Team or phpBB MODifications Team may not be able to provide support.

This MOD has only been tested by the phpBB MOD Team with the phpBB version in the topic title. It may not work in any other versions of phpBB.

Posted: Fri Apr 28, 2006 1:36 pm
by webmacster87
MOD Validated/Released

Notes:
Uses a default avatar if an external avatar is unable to be loaded.
Image

Posted: Fri Apr 28, 2006 8:00 pm
by onigumo
Can this "default" avatar be made to be no avatar at all?

Posted: Fri Apr 28, 2006 8:58 pm
by Kieran007
Yes, but you will need to make the following code changes after installing the mod:-

Code: Select all

# 
#-----[ OPEN ]--------------------------------------------- 
# 
viewtopic.php
#
#-----[ FIND ]---------------------------------------------
#
     					$poster_avatar = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $phpbb_root_path . $images['default_offsite_avatar'] . '" alt="" border="0" />' : '';
#
#-----[ REPLACE WITH ]---------------------------------------------
#
     					$poster_avatar = ( $board_config['allow_avatar_remote'] ) ? '' : '';
# 
#-----[ OPEN ]--------------------------------------------- 
# 
includes/usercp_viewprofile.php
#
#-----[ FIND ]---------------------------------------------
#
     				$avatar_img = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $phpbb_root_path . $images['default_offsite_avatar'] . '" alt="" border="0" />' : '';
#
#-----[ REPLACE WITH ]---------------------------------------------
#
     				$avatar_img = ( $board_config['allow_avatar_remote'] ) ? '' : '';
# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
That should do the job for you :)

Posted: Fri Apr 28, 2006 10:01 pm
by Peter77sx
Oh that is awesome... I wonder if this could work with the "default avatar" MOD.. I guess I'll find out in a few days. :)

Posted: Fri Apr 28, 2006 10:08 pm
by Kieran007
It *should* do. My mod only checks the avatar at the point of loading a remote image, so as long as the default avatar mod you describe is concerned with a default local image, then the mods should run in tandem :)

Posted: Sat Apr 29, 2006 12:27 am
by onigumo
Kieran007 wrote: Yes, but you will need to make the following code changes after installing the mod:-

Code: Select all

# 
#-----[ OPEN ]--------------------------------------------- 
# 
viewtopic.php
#
#-----[ FIND ]---------------------------------------------
#
     					$poster_avatar = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $phpbb_root_path . $images['default_offsite_avatar'] . '" alt="" border="0" />' : '';
#
#-----[ REPLACE WITH ]---------------------------------------------
#
     					$poster_avatar = ( $board_config['allow_avatar_remote'] ) ? '' : '';
# 
#-----[ OPEN ]--------------------------------------------- 
# 
includes/usercp_viewprofile.php
#
#-----[ FIND ]---------------------------------------------
#
     				$avatar_img = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $phpbb_root_path . $images['default_offsite_avatar'] . '" alt="" border="0" />' : '';
#
#-----[ REPLACE WITH ]---------------------------------------------
#
     				$avatar_img = ( $board_config['allow_avatar_remote'] ) ? '' : '';
# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
That should do the job for you :)


That's awesome, dude. Now all I need to do is find one that does the same for signatures. *wink, wink, nudge, nudge* :wink:

Posted: Sat Apr 29, 2006 3:14 am
by Peter77sx
Kieran007 wrote: It *should* do. My mod only checks the avatar at the point of loading a remote image, so as long as the default avatar mod you describe is concerned with a default local image, then the mods should run in tandem :)


Yup! it works just fine with no conflicts. easier install then I thought. thank you much for this nifty MOD. very useful! :)
onigumo wrote: Now all I need to do is find one that does the same for signatures. *wink, wink, nudge, nudge* :wink:


:lol: Agreed!

Posted: Sat Apr 29, 2006 3:56 pm
by Kieran007
Peter77sx wrote: Yup! it works just fine with no conflicts. easier install then I thought. thank you much for this nifty MOD. very useful! :)


Great :)
Peter77sx wrote:
onigumo wrote: Now all I need to do is find one that does the same for signatures. *wink, wink, nudge, nudge* :wink:

:lol: Agreed!


Looking at the way bbcode is applied to posts and sigs, it would appear that code in signatures are in fact handled separately to the img code in posts, so such a mod may well be possible. I will certainly look into it.

Posted: Sun May 07, 2006 11:53 pm
by saaiberke
Kieran007,

The mod works great! No more nagging about slow board :)

I had to uninstall the Fast resize avatar mod to install yours, now I'm trying to combine both but I don't seem to manage that. :(

Do you see any solution to combine both mods?

Thx,

Nic

Posted: Mon May 08, 2006 12:01 am
by Saeru
Question.. if it works with the default avatar mod..

If a users avatar brakes.. a default avatar is displayed right?

It that from this mod? or the one from the default avatar mod?

I'd like to use this and like.. if a user just hasn't selected an avatar.. the default avatar mod displays a "No avatar selected" image..

But from this, is a users linked avatar is broken.. then have another one displayed saying just that..

would that be doable with this?

Posted: Mon May 08, 2006 12:03 am
by Saeru
saaiberke wrote: Kieran007,

The mod works great! No more nagging about slow board :)

I had to uninstall the Fast resize avatar mod to install yours, now I'm trying to combine both but I don't seem to manage that. :(

Do you see any solution to combine both mods?

Thx,

Nic


You can try the Remote Avatar Check Mod.. it's what my board uses and it works fantastic.

Posted: Mon May 08, 2006 7:27 am
by saaiberke
Does it also change the dimensions of the avatar? And how do I combine both modifications? I think they're both changing some lines.

It would be great if the board checks the presence of the remote avatar and then resizes it as mentioned in the ACP.

Grtz,

Nic

Posted: Mon May 08, 2006 9:05 am
by Kieran007
saaiberke wrote: The mod works great! No more nagging about slow board :)


Excellent :)
saaiberke wrote: I had to uninstall the Fast resize avatar mod to install yours, now I'm trying to combine both but I don't seem to manage that. :(

Do you see any solution to combine both mods?


I will investigate this. Without having yet consulted the code I would expect that the line(s it changes are the same ones I changed to deal with the remote avatar. You may find however that the code that deals with the resize or accessing the resize method you can just add inside my if-statement after adding my mod. I will check it out though and get back to you :)

Posted: Mon May 08, 2006 9:09 am
by Kieran007
Saeru wrote: Question.. if it works with the default avatar mod..

If a users avatar brakes.. a default avatar is displayed right?


This is correct.
Saeru wrote: It that from this mod? or the one from the default avatar mod?


When a link to an external avatar breaks, it is the default avatar from this mod that is displayed.
Saeru wrote: I'd like to use this and like.. if a user just hasn't selected an avatar.. the default avatar mod displays a "No avatar selected" image..

But from this, is a users linked avatar is broken.. then have another one displayed saying just that..

would that be doable with this?


By combining the two mods, as far as I know, this is what happens. There have been reports that they work together, so all should work as expected. Best way is to back up files that will be changed and try it and see :)