MyBB Community Forums

Full Version: Avatar FTP
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Does anyone have a plugin that will FTP an "uploaded" avatar to a separate server?

I'd like to upload avatars to a CDN instead of my own server.
So, when an avatar is uploaded, it will also be uploaded to the CDN server? Or directly uploaded to the CDN without any local copy?
I don't, I'd figure you'd be able to write your own pretty quickly though
A local copy is fine as a backup but in the DB I'd like the avatar URL to be the "remote" location.

Quote:I don't, I'd figure you'd be able to write your own pretty quickly though

I peeked at it a bit and while i know I can do it I'm not that fast of a coder. Especially given my work load with HF. I just barely have time for new projects.

Was hoping someone here might have something. Lots of new coders with new plugin sites that imho would benefit having this one done.

A search of past threads shows more than a few people wanting a similar function. Either a CDN, external FTP, or just an image host.

I'd prefer something with FTP settings in admincp where avatar url will first upload local, hit the hook, then upload avatar to FTP site and change the user table to reflect new location.

My CDN has a cname too so it's slick like that.

Maybe I'll do this but I'd love it if someone else gave this a shot.
Heck, I'll give it a shot.

Haven't tested it out. Probably needs a bit more validation. Even so, it's a base to start off with. I'll check this thread in the morning.

See attachment.
Nice base.

You're missing the avatar type for the users table. It would need to changed to "remote".

Otherwise I might test this a bit.
That was fast, nice work Malcolm.
(2011-11-14, 12:18 AM)labrocca Wrote: [ -> ]Nice base.

You're missing the avatar type for the users table. It would need to changed to "remote".

Otherwise I might test this a bit.

Updated. That should suffice. Lmk how it works out. Smile

(2011-11-14, 02:23 AM)Dylan M. Wrote: [ -> ]That was fast, nice work Malcolm.

Thanks Dylan. Always nice to hear feedback. Wink
thank you for your work.
how I can use this file? when I uploaded it to my plugin folder and go to ACP>Plugin this error occur:
Parse error: syntax error, unexpected T_STRING in /home/civilea/public_html/forum/inc/plugins/avatar_ftp.php on line 150
@Hanky:

Try to replace:

ftp_close($id);

on line 150 with:

ftp_close(&$id);
Pages: 1 2