Avatar FTP
#1
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.
Reply
#2
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?
No longer involved in the MyBB project.
Reply
#3
I don't, I'd figure you'd be able to write your own pretty quickly though
Reply
#4
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.
Reply
#5
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.


Attached Files
.php   avatar_ftp.php (Size: 4.37 KB / Downloads: 241)
No longer involved in the MyBB project.
Reply
#6
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.
Reply
#7
That was fast, nice work Malcolm.
Reply
#8
(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
No longer involved in the MyBB project.
Reply
#9
This user has been denied support. This user has been denied support.
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
Reply
#10
This user has been denied support. This user has been denied support.
@Hanky:

Try to replace:

ftp_close($id);

on line 150 with:

ftp_close(&$id);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)