Firefox PHP

Avatar Module

Posted by Chris Eaton 
Re: Avatar Module
November 09, 2005 03:51PM
this module is quite the hack. it does work but in a very roundabout kind of way. i was using for a short time but eventually abandoned it because it confused my users too much. it would also break in non-public forums.

if you want to put a bit more work in but have an amazing avatar system check out the Phorum Integration forum's thread about working with phpGallery 2.0

I do that now and it lets my users upload as many images as they want to their own personal gallery and i can choose their highlighted image to be their avatar.

Gives the user the freedom to not have to resize their images at all and crop the thumbnail however they want..

very nice.
Re: Avatar Module
November 21, 2005 01:08PM
hi,
i had setup avatar module for phorum5.1-4. but i can't set it working.

everything is working but when i'm choosing an avatar on a new post there's no avatar display. if edit the message avatar is setted as none, if i set another avatar on the edit page, then it will be corectly displayed.

is anyone have an idear about this ?

thanks for help :)
Re: Avatar Module
November 21, 2005 06:32PM
i found the problem became from the line 115 whith the check of existence or not of the avatar isset($PHORUM['DATA']['mod_avatar_files'][$_POST["mod_avatar"]])

is this really usefull ?

because in the control center user can only set name from existing image, so in the post form, avatar listed are user's avatar(i think)

so i propose to replace
--------------------------------
if (isset($_POST["mod_avatar"])){
// If they are trying to set an avatar, make sure the file is in
// their avatar list.
if ($_POST["mod_avatar"] >= 1 && isset($PHORUM['DATA']['mod_avatar_files'][$_POST["mod_avatar"]])){
$message["meta"]["mod_avatar"] = $_POST["mod_avatar"];
}
// If we get here, either they're not posting with an avatar
// or they tried to use an invalid file.
else {
unset($message["meta"]["mod_avatar"]);
}
}
-------------------------
by
-------------------------
if (isset($_POST["mod_avatar"]) && $_POST["mod_avatar"] >= 1){
// If they are trying to set an avatar, make sure the file is in
// their avatar list.

$message["meta"]["mod_avatar"] = $_POST["mod_avatar"];

}
else {
unset($message["meta"]["mod_avatar"]);
}
----------------------------

it semm's to work fine :)
Re: Avatar Module
November 22, 2005 02:46AM
Hhhm, what file are we talking about now? So this works ?

Sergej

------------------------------------------
^AU^ Assassins United
[www.assassinsunited.com]
------------------------------------------
Re: Avatar Module
December 04, 2005 08:49AM
Hi,

I've just installed phorum 5.0.21 and amended with the avatar module, but I seem to by getting a problem with the getimagesize function call in mod_avatar.php

No images are being displayed in my control centres, although images have been uploaded successfully and appear in edit my files.

The image is 60x60, max limit set to 100x100, file type is gif and gif is enabled.

After abit of debugging, the problem seems to be the getimagesize is returning no size details and as a consequence, the images are not displayed in the avatar image list.

To prove this I have removed the image size check (&& mod_avatar_check_dimensions($fileid)) from the if statement and its all working. There are no strange characters in the URL being passed as $filename and if I cut & Paste the url into a browser it returns the image.

debug output:

echo ("filename = ($filename) size = <$imagedata[0]> x <$imagedata[1] ($imagedata[3])");

returns

filename = (http://www.twinsclub.co.uk/forumFT/file.php?6,file=5) size = <> x <> ()

Any ideas would be gratefully appreciated

Teej



Edited 1 time(s). Last edit at 12/04/2005 08:49AM by teej710.
Re: Avatar Module
December 04, 2005 01:09PM
What are the permissions of the forum you are trying to access the image (or your control panel for that matter) through?

looks like forum_id = 6 from your example.

Because the image size is trying to open the image via the httpd, if that forum requires a login it breaks this avatar module.

sad but true.



Edited 4 time(s). Last edit at 12/04/2005 01:35PM by rheo.
Re: Avatar Module
December 04, 2005 04:57PM
Thanks for the info, it has solved my problems

teej
Re: Avatar Module
January 19, 2006 12:48PM
The latest module with the recent code change works but it break in preview post so if you preview a post in 5.1 it will not work and wiped from the post.


So you will need to post it without preveiwing for it to work unless someone can come up with a fix to it.


Bill
Re: Avatar Module
February 24, 2006 12:07AM
Whew, 23 pages and nothing solid to use it seems.

Steel Rat
[infinite-realities.com]
mcm
Re: Avatar Module
March 07, 2006 07:14PM
Hi
Ive got this mod working OK but the link for "Edit Avatars" in the control panel has no text.

The link is there but its invisible .. I can only find it by hovering the mouse around.

I,ve followed the install instructions 100%.

I tried adding a line in the lang file too .. no luck!
Sorry, only registered users may post in this forum.

Click here to login