Firefox PHP

Module: User Avatar

Posted by Maurice Makaay 
Re: Module: User Avatar
July 01, 2008 08:36PM
Quote
Maurice Makaay
One problem with those that has to be handled is that you have to gracefully catch problem that occur when the remote avatar is deleted from the server. You don't want a forum full of broken images. Probably some scheduled job (and/or admin panel) is needed to clean up broken remote avatars.

Could that simply be a "if exists" check in the avatar mod or would that add too much overhead?


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Re: Module: User Avatar
July 01, 2008 09:46PM
Using the http_get api, it's easy to check if some image can be loaded or not. In the control center it's easy. There we can disable / remove an avatar for which the URL is invalid.

The problem is for the avatars that are shown in the forums for users that do not enter the control center (long gone users for example, that cleaned up their avatar image from the URL). For those, it's defenitely too heavy to start checking whether the avatar is available or not while showing the pages. For these, a periodic check to clean out broken avatars would be best.

A possible solution could be to create a local cache for URL avatars, so the URL only has to be checked once in a while (if the local cache copy does not exist or is old enough to do a refresh). However, that would hurt the file storage quotum just as much as storing the images in the database in the first place. Not a solution for Adam therefore.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: User Avatar
July 01, 2008 09:52PM
How about a combination. Check for the image at the time it is displayed. If the image cannot be found, update the database by removing that avatar from the user. If the image is available place a timestamp in the database and only check again after that stamp has expired (daily, weekly, etc).


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Re: Module: User Avatar
July 01, 2008 09:55PM
Something like that would work and would validate as "scheduled checking" for me.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: User Avatar
July 01, 2008 10:29PM
Hi Maurice,

sometimes I have the following message in event log:

PHP notice: Undefined index: mod_user_avatar

PHP notice generated at /var/www/langzeittest.de/html/intern/phorum-5.2.8-RC1/mods/user_avatar/cc_panel.php:20

Back trace:

Function include called at
{path to Phorum}/mods/user_avatar/user_avatar.php:206
----
Function mod_user_avatar_cc_panel called
----
Function call_user_func_array called at
{path to Phorum}/common.php:1555
----
Function phorum_hook called at
{path to Phorum}/control.php:202
----

Request info:

HTTP_HOST = forum.langzeittest.de
HTTP_REFERER = [forum.langzeittest.de]
REQUEST_URI = /control.php?224,panel=avatar
QUERY_STRING = 224,panel=avatar

Regards
Oliver


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Re: Module: User Avatar
July 01, 2008 10:34PM
Thanks. Version 3.0.3 should fix this problem.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: User Avatar
July 01, 2008 11:34PM
I have installed the Version 3.0.3 but I have the same problème.
I am on IE7 and I see the avatars when I anm log out and I see a cross when I am log in, but it is work well with FireFox.

Is it possible to modify the code source to see the avatars for all users (registred users and not registred users) ?
Re: Module: User Avatar
July 01, 2008 11:38PM
Quote
victoria
I am on IE7 and I see the avatars when I anm log out and I see a cross when I am log in, but it is work well with FireFox.

Is it possible to modify the code source to see the avatars for all users (registred users and not registred users) ?

Mind sharing your site and possibly creating a test user so we can see what it looks like when logged in?


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Re: Module: User Avatar
July 01, 2008 11:42PM
You posted the same question in this thread. I responded with clear instructions about what we wanted to see. How about following them up? Additionally, did you really try the other avatar module as well, since you posted in that thread? Or have you only tried the User Avatar module?


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: User Avatar
July 02, 2008 07:40AM
Sorry MAURICE, for me it was the same module but I use "user_avatar 3.0.3"

With IE7 when I am log out, the URL of an avatar image is : [bjacob.lautre.net]

When I am log in, the URL of same avatar image is : [bjacob.lautre.net]%

With Firefox, in log in or log out mode, the URL of same avatar image is : [bjacob.lautre.net]


I sent you a private message
Sorry, only registered users may post in this forum.

Click here to login