[2.0.19] Remote 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!
7
54%
Very Good
3
23%
Good
3
23%
Fair
0
No votes
Poor
0
No votes
 
Total votes: 13

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

[2.0.19] Remote Avatar Check

Post by Extensions Robot » Sat Oct 22, 2005 7:10 pm

MOD Name: Remote Avatar Check
Author: darklordsatan
MOD Description: This mod performs several checks over a remote avatar, to ensure it complies with the avatar settings made by the forum admin. Those checks include that the remote image exists, its filesize and dimensions.


MOD Version: 1.0.2 (Updated 03/12/06)

Download File: Remote_Avatar_Check_1_0_2.zip
mods overview page: View
File Size: 3127 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:27 am, edited 1 time in total.
(this is a non-active account manager for the phpBB Extension Customisations Team)

ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 » Tue Nov 08, 2005 6:41 am

MOD Validated/Released

Notes:
With this MOD, remote avatars can be checked against the avatar setting in admin control panel.

User avatar
badboy4ever
Registered User
Posts: 177
Joined: Sat Jun 11, 2005 2:38 pm
Location: UK

Post by badboy4ever » Tue Nov 08, 2005 4:51 pm

Aint there millions of these?

Image

Krisiun
Registered User
Posts: 124
Joined: Mon Feb 03, 2003 12:46 pm
Location: Porto Alegre - Brazil
Contact:

Post by Krisiun » Tue Nov 08, 2005 5:41 pm

badboy4ever wrote: Aint there millions of these?
Yes, but this is more efficient. And 2.0.18 compatible. 100% tested.

Only I think who one acp option to allow/disable will be useful. :wink:

darklordsatan
Registered User
Posts: 164
Joined: Sat Oct 15, 2005 3:04 am
Location: Cali - Colombia

Post by darklordsatan » Tue Nov 08, 2005 9:45 pm

Whoa thanks to the validation team again. I had forgotten about this one :D
badboy4ever wrote: Aint there millions of these?

But you could train a monkey to install this one. Just two additions required :P
Krisiun wrote:
badboy4ever wrote:Aint there millions of these?
Yes, but this is more efficient. And 2.0.18 compatible. 100% tested.

Only I think who one acp option to allow/disable will be useful. :wink:

Well, thanks for testing it :)
An ACP option... well dont know for sure. My goal is to make simple tiny mods that can be installed on heavily modded boards with no problem at all, since I have many of those :D
But Ill think about it.

TexasBlake
Registered User
Posts: 59
Joined: Thu Feb 06, 2003 4:05 am
Location: Houston, Texas
Contact:

Post by TexasBlake » Wed Nov 09, 2005 7:22 am

Just did the MOD. I love it. Now I just have to go back and delete those who have avatars too big cause lord knows they won't delete them themselves. :P

[2k]
Registered User
Posts: 36
Joined: Mon Sep 19, 2005 9:01 pm
Location: Netherlands
Contact:

Post by [2k] » Thu Nov 10, 2005 11:30 pm

I installed the mod, but somehow I don't see the error messages, only the border around of it, in which the messages should appear. What's wrong?
(I'm using v .17).
Edit: fixed, stupid mistake with working (editting) the backup files and uploading the new files (doh). Works great!

User avatar
badboy4ever
Registered User
Posts: 177
Joined: Sat Jun 11, 2005 2:38 pm
Location: UK

Post by badboy4ever » Sun Nov 13, 2005 11:03 pm

Just installed on a slightly modded 2.0.18 board works well and dose what it says on the tin.

Image

wanted
Registered User
Posts: 11
Joined: Wed Aug 20, 2003 12:40 pm
Location: Demon's Island
Contact:

Post by wanted » Mon Nov 14, 2005 10:37 am

Hi, :D

in my site the avatar error message appear when the size of remote avatar was smaller than default value into config table. I resolved the problem with this code.

I replaced this code:

Code: Select all

	$user_avatar_size = 0;
	do
	{
		if (strlen(@fread($remote_file, 1)) == 0) 
		{ 
			break; 
		} 
		$user_avatar_size ++; 
	} 
	while(true);
with this one:

Code: Select all

	$user_avatar_size = @filesize($avatar_filename);
The filesize() function in php returns the size of the file in bytes and compatible with (PHP 3, PHP 4, PHP 5). :D

darklordsatan
Registered User
Posts: 164
Joined: Sat Oct 15, 2005 3:04 am
Location: Cali - Colombia

Post by darklordsatan » Tue Nov 15, 2005 3:49 am

wanted wrote: The filesize() function in php returns the size of the file in bytes and compatible with (PHP 3, PHP 4, PHP 5). :D

Yes, but it wont work with remote files.
So I suposse you have enabled the option to select local avatars or upload them?
In any case thanks, Ill check out this issue.

peppomcr
Registered User
Posts: 25
Joined: Sun Nov 20, 2005 10:07 am
Location: Italy, EU

Post by peppomcr » Sun Nov 20, 2005 4:17 pm

Very useful! :D

peppomcr
Registered User
Posts: 25
Joined: Sun Nov 20, 2005 10:07 am
Location: Italy, EU

Post by peppomcr » Mon Nov 21, 2005 10:35 pm

I've some questions: if I install it today this mod will check only future avatars?
Avatars that have been set yesterday will they be checked?
If an avatar is too big what does the script do? Delete avatars or send admin a message?

darklordsatan
Registered User
Posts: 164
Joined: Sat Oct 15, 2005 3:04 am
Location: Cali - Colombia

Post by darklordsatan » Wed Nov 23, 2005 1:51 pm

peppomcr wrote: if I install it today this mod will check only future avatars?

Yes, only for future avatars.
peppomcr wrote: Avatars that have been set yesterday will they be checked?

Nope, but I could include a script with the next version, that checks all the existent ones in the avatar... dont know though If the validation team will be happy about this, so Ill make a question.
peppomcr wrote: If an avatar is too big what does the script do? Delete avatars or send admin a message?

It simply shows an error message to the user... just like when there is something wrong with any field in the profile...
Notice this mod is meant to work when the user tries to change his/her avatar in the profile.

Millennyum
Registered User
Posts: 88
Joined: Sun Apr 10, 2005 11:19 am
Location: Netherlands
Contact:

Post by Millennyum » Wed Dec 07, 2005 4:14 pm

When I try to upload an avatar from an URL that is too big in size, I get an error:
Unable to upload file

DEBUG MODE

Line : 288
File : /home/aliceinw/domains/alice-in-wonderland.net/public_html/forum/includes/usercp_avatar.php

However, the file is a normal (but animated) .gif file.
Another animated gif that does comply with the size limits gives no problem.

What could be the problem causing this error message? Why don't I get the normal error message? Or is this the normal message and can I cange it into something like "The image you are trying to upload does not comply with the size regulations"?

peppomcr
Registered User
Posts: 25
Joined: Sun Nov 20, 2005 10:07 am
Location: Italy, EU

Post by peppomcr » Wed Dec 07, 2005 5:36 pm

Millennyum wrote: When I try to upload an avatar from an URL that is too big in size, I get an error:
Unable to upload file

DEBUG MODE

Line : 288
File : /home/aliceinw/domains/alice-in-wonderland.net/public_html/forum/includes/usercp_avatar.php

However, the file is a normal (but animated) .gif file.
Another animated gif that does comply with the size limits gives no problem.

What could be the problem causing this error message? Why don't I get the normal error message? Or is this the normal message and can I cange it into something like "The image you are trying to upload does not comply with the size regulations"?

No it isn't normal message.
Try to save/upload the gif using a free image host.
Then try to use the gif as an avatar.

Post Reply

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