How to create an Avatar Driver?

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
Registered User
Posts: 30
Joined: Fri Jan 15, 2010 10:29 pm

How to create an Avatar Driver?

Post by parsim » Mon Jan 05, 2015 5:30 am

In 3.0, our forum uses a three-line MOD to specify a different server for hosting user avatar images. It's incredibly simple: it just prepends the server name to the beginning of the avatar path. But I can't figure out how to do this in 3.1.

We don't need to worry about how avatars get set; that's handled elsewhere. We just need to tell phpBB that all the avatars exist on a different server.

What I've tried:

1. Entering the full path including hostname of the remote avatar server in ACP -> Avatar Settings -> Avatar gallery path.

Why it doesn't work: The forum refuses to accept a hostname in the path. As its help text says, it requires that the path exist under the phpBB root directory.

2. Disabling gallery avatars and using "remote avatars" instead.

Why it doesn't work: It does, if we rewrite the database to change everyone's avatar value from something like "mypic.jpg" to "http://our.image.server/images/avatars/mypic.jpg". This wastefully inflates the database (we have 625,000 users) and makes it more difficult to change the avatar server's location in the future.

3. Writing an extension that provides an avatar driver, which I select in the ACP. After combing through the 3.1 source, it looks like this is exactly what I'm supposed to do, since it provides handy hooks for things like get_custom_html().

Why it doesn't work: I've completely failed to find any documentation on how to do this. Is there any? I've been trying and failing to deduce what 3.1 wants me to do from the source.

User avatar
John P
Registered User
Posts: 1237
Joined: Mon Jan 21, 2008 3:55 pm
Location: Netherlands
Name: John

Re: How to create an Avatar Driver?

Post by John P » Thu Aug 06, 2015 8:15 pm

I'm wondering why my post is deleted
Webhosting, Custom MODs, Technical management, MOD installation and Webdesign

Registered User
Posts: 1441
Joined: Mon May 21, 2007 10:19 am

Re: How to create an Avatar Driver?

Post by wired076 » Thu Sep 10, 2015 12:37 am

John P wrote:I'm wondering why my post is deleted
Hi John,

There were recently some issues with the website please take a look at the following announcement: viewtopic.php?f=14&t=2330121

Post Reply

Return to “Extension Writers Discussion”