[2.0.20] Avatar Check

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
3
100%
Very Good
0
No votes
Good
0
No votes
Fair
0
No votes
Poor
0
No votes
 
Total votes: 3

Extensions Robot
Extensions Robot
Extensions Robot
Posts: 29220
Joined: Sat Aug 16, 2003 7:36 am

[2.0.20] Avatar Check

Post 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.
Last edited by Extensions Robot on Mon Apr 30, 2007 12:28 am, edited 1 time in total.
(this is a non-active account manager for the phpBB Extension Customisations Team)
User avatar
webmacster87
Former Team Member
Posts: 3758
Joined: Fri Jun 11, 2004 2:30 am
Location: San Mateo, CA
Name: Douglas Bell
Contact:

Post by webmacster87 »

MOD Validated/Released

Notes:
Uses a default avatar if an external avatar is unable to be loaded.
Image
User avatar
onigumo
Registered User
Posts: 1755
Joined: Fri Oct 31, 2003 2:32 am
Contact:

Post by onigumo »

Can this "default" avatar be made to be no avatar at all?
I write articles on community building
@ The Infinity Program.
User avatar
Kieran007
Registered User
Posts: 273
Joined: Sun Aug 29, 2004 9:28 am
Location: London, UK
Name: Kieran O'Shea
Contact:

Post 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 :)
Kieran
[ RouterTech - Tech Support for all things networking ]
Useful phpBB links: Use the Forum Search!
No support via PM, please ask your questions in the forum!
Peter77sx
Registered User
Posts: 3260
Joined: Wed Nov 09, 2005 2:51 pm

Post 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. :)
User avatar
Kieran007
Registered User
Posts: 273
Joined: Sun Aug 29, 2004 9:28 am
Location: London, UK
Name: Kieran O'Shea
Contact:

Post 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 :)
Kieran
[ RouterTech - Tech Support for all things networking ]
Useful phpBB links: Use the Forum Search!
No support via PM, please ask your questions in the forum!
User avatar
onigumo
Registered User
Posts: 1755
Joined: Fri Oct 31, 2003 2:32 am
Contact:

Post 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:
I write articles on community building
@ The Infinity Program.
Peter77sx
Registered User
Posts: 3260
Joined: Wed Nov 09, 2005 2:51 pm

Post 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!
User avatar
Kieran007
Registered User
Posts: 273
Joined: Sun Aug 29, 2004 9:28 am
Location: London, UK
Name: Kieran O'Shea
Contact:

Post 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.
Kieran
[ RouterTech - Tech Support for all things networking ]
Useful phpBB links: Use the Forum Search!
No support via PM, please ask your questions in the forum!
saaiberke
Registered User
Posts: 1126
Joined: Wed Jul 20, 2005 8:13 am
Location: Gent/Belgium
Contact:

Post 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
User avatar
Saeru
Registered User
Posts: 622
Joined: Sun Feb 19, 2006 5:44 am
Location: Under a pile of PHP code.
Contact:

Post 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?
"Naku ga yousuru ichidanto tsuyosa kyaku ga icchuu wo yusuru."[/size]
User avatar
Saeru
Registered User
Posts: 622
Joined: Sun Feb 19, 2006 5:44 am
Location: Under a pile of PHP code.
Contact:

Post 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.
"Naku ga yousuru ichidanto tsuyosa kyaku ga icchuu wo yusuru."[/size]
saaiberke
Registered User
Posts: 1126
Joined: Wed Jul 20, 2005 8:13 am
Location: Gent/Belgium
Contact:

Post 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
User avatar
Kieran007
Registered User
Posts: 273
Joined: Sun Aug 29, 2004 9:28 am
Location: London, UK
Name: Kieran O'Shea
Contact:

Post 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 :)
Kieran
[ RouterTech - Tech Support for all things networking ]
Useful phpBB links: Use the Forum Search!
No support via PM, please ask your questions in the forum!
User avatar
Kieran007
Registered User
Posts: 273
Joined: Sun Aug 29, 2004 9:28 am
Location: London, UK
Name: Kieran O'Shea
Contact:

Post 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 :)
Kieran
[ RouterTech - Tech Support for all things networking ]
Useful phpBB links: Use the Forum Search!
No support via PM, please ask your questions in the forum!
Post Reply

Return to “[2.0.x] MOD Database Releases”