Page Index Toggle Pages: [1] 2 3 ... 14 Send TopicPrint
Very Hot Topic (More than 25 Replies) Upload Avatar Mod 1.5 Beta SP1.31 (Read 32937 times)
louisle
God Member
*****
Offline


With a little bit of love
everything goes better

Posts: 1124
Location: Muenchen
Joined: Apr 9th, 2003
Gender: Male
Upload Avatar Mod 1.5 Beta SP1.31
Nov 16th, 2003 at 12:04pm
Print Post  
SECURITY HOLE FOUNDED -  PLEASE BE CAREFUL. DOWNLOAD STOPPED


Hello YaBBmoders ,

This mod allows each member to upload their own avatar file (jpg, png & gif) to a separate directory in the avatars directory.
This version is for YaBB 1.3.x which does NOT have the attachment mod installed. It has the possibility to limit the uploaded avatars filesize.

1.1 Beta Fix : change YaBB.pl to YaBB.$yyext (2 times)

1.2 Wiebkes suggestions and File Attachment Support.

1.3 D. Baughman's use CGI fix ( thanx and thanx to Flicker ).

1.4 D. B's CGI fix doesn't work, so ... Fixed a security hole

1.5 D. B's CGI fix built, CPanel Update fix and autoset fix.

If you have the File Attachment Mod installed
then you have to do the 2 step manually.
It should looks like this in Subs.pl :

Code
Select All
if ($ENV{REQUEST_METHOD} eq 'POST') {
  if ($ENV{CONTENT_TYPE} =~ /multipart\/form-data/){
   require CGI; import CGI qw(:standard);
   my $query = new CGI;
   my (@keylist) = sort($query->param());
   foreach $key (@keylist) {
    if ($query->param('file')) {
     $filename = $query->param('file');
     $postsize -= length($query->param('file'));
     $tmpfile = $query->tmpFileName($filename);
    }
    
   $postsize += length($query->param($key));
   # may be dealing with multiple values; need to join with comma
   $value = join(', ', $query->param($key));
   $FORM{$key} = $value;

   my $avatar = $query->param('umafile');
   my $tmpfile = $query->tmpFileName($avatar);

   local( $/, *TMP );
   open(TMP,"$tmpfile");
   my $filedata = <TMP>;
   close(TMP);

   open(TMP2,">$umauploaddir/$avatar");
   print TMP2 $filedata;
   close(TMP2);
  }

  } else {
   read(STDIN, my $input, $ENV{CONTENT_LENGTH});
   split_string(\$input, \%FORM)  
  } 



greetings
louisle
« Last Edit: Sep 3rd, 2004 at 11:26pm by louisle »  

uplava15beta.mod ( 12 KB | Downloads )

I LIKE SAUSAGE FINGERS:2thumbsup::2thumbsup::2thumbsup::2thumbsup::2thumbsup:
Back to top
IP Logged
 
caliman
God Member
*****
Offline


Swanky

Posts: 1220
Location: Pt. Richmond
Joined: Mar 20th, 2002
Gender: Male
Re: Upload Avatar Mod 1.1 Beta SP1.31
Reply #1 - Nov 16th, 2003 at 7:50pm
Print Post  
louisle wrote on Nov 16th, 2003 at 12:04pm:
1.1 Beta Fix : change YaBB.pl to YaBB.$yyext (2 times)


What this about louisle?
  
Back to top
WWW  
IP Logged
 
Jazhawk
God Member
*****
Offline


I'm not always right but
I'm never wrong

Posts: 799
Location: Las Vegas
Joined: Mar 11th, 2002
Gender: Male
Re: Upload Avatar Mod 1.1 Beta SP1.31
Reply #2 - Nov 16th, 2003 at 8:13pm
Print Post  
Good job.  But I'll need to wait for the version for those sporting the attachment mod.

-Jazhawk
  
Back to top
IP Logged
 
louisle
God Member
*****
Offline


With a little bit of love
everything goes better

Posts: 1124
Location: Muenchen
Joined: Apr 9th, 2003
Gender: Male
Re: Upload Avatar Mod 1.1 Beta SP1.31
Reply #3 - Nov 17th, 2003 at 12:08pm
Print Post  
@caliman : the first bug i wiped out in version 1.1

@Jazhawk : take a look on post #100 of the gallery mod beta 2 and do so with the code of the avatar upload mod.

greetings
louisle
  

I LIKE SAUSAGE FINGERS:2thumbsup::2thumbsup::2thumbsup::2thumbsup::2thumbsup:
Back to top
IP Logged
 
wiebke
Senior Member
****
Offline



Posts: 328
Joined: Apr 24th, 2002
Gender: Female
Re: Upload Avatar Mod 1.1 Beta SP1.31
Reply #4 - Nov 24th, 2003 at 4:40pm
Print Post  
ok, here´s my test-report:

I´ve got one installation-confict in step 7 with IM - this would be easier with an add-after-action instead of search-and-replace. No other conficts with 45 mods on my SP1.3.1 (without attachments) Smiley

Works really great, without any problems so far. One suggestion: if you choose "upload own avatar" you find the 2save profile" button to confirm upload and then have to click the save-proilfe-button again in your profile - a little bit confusing IMHO. Perhaps you can change the first "save"-butoon to somthing like "upload avatar"? Would be great!

greta mod Cheesy
  
Back to top
 
IP Logged
 
Madkeen
Full Member
***
Offline



Posts: 147
Joined: May 18th, 2003
Gender: Male
Re: Upload Avatar Mod 1.2 Beta SP1.31
Reply #5 - Nov 28th, 2003 at 11:29am
Print Post  
Got it working, so far it seems fine.

Had to do 2 minor changes.
1. The attachment mod as explained above
2. Adjust so it worked with the Biography mod.

Other than that it is great.

Thanks for the mod, had been waiting for it for a while.

  
Back to top
 
IP Logged
 
Stewart Gilray
Full Member
***
Offline


Help me Obi-wan...

Posts: 196
Joined: Jul 9th, 2002
Gender: Male
Re: Upload Avatar Mod 1.2 Beta SP1.31
Reply #6 - Nov 28th, 2003 at 10:39pm
Print Post  
Hi everyone, sorry being completely out of touch.

I've just started a new business and all hell has broken loose in terms of what we've been doing.

I've had LITTLE or NO time to work on anything, other than the occasional bug fix of something at 2am once every couple of weeks (auction mod).

I'm more than happy for Louisle to take over the development of anything of this nature, I just don't have the time at all...

So thanks for those who gave me feedback when I did my original beta.
Sorry it took SOOOO long to find what the problem was (forgot a mod step).
Sorry I never finished off v2.0

Someone emailed me and asked how I managed to work out the x and y size of a jpg etc. I literally read into the header of the data once it was uploaded and pulled the info out of the files. (if anyone is interested).

Anyway, thanks again.

Great work Louisle Smiley
  
Back to top
 
IP Logged
 
louisle
God Member
*****
Offline


With a little bit of love
everything goes better

Posts: 1124
Location: Muenchen
Joined: Apr 9th, 2003
Gender: Male
Re: Upload Avatar Mod 1.2 Beta SP1.31
Reply #7 - Nov 29th, 2003 at 12:13am
Print Post  
Hello Stewart Gilray,

i'm very happy, that you are not angry about me because "took over" your mod. To be honest i don't have time to improve this mod very much, too. maybe we could work together .. do you want help me to improve this mod ? so if you want implement anything useful to this mod, so feel free to do. i beg for it. and set yourself in the <author> tag. it would be a pleasure for me to work with you  Smiley.

greetings
louisle
  

I LIKE SAUSAGE FINGERS:2thumbsup::2thumbsup::2thumbsup::2thumbsup::2thumbsup:
Back to top
IP Logged
 
Flicker
Senior Member
****
Offline


Six-Strings

Posts: 291
Location: Stockport
Joined: Oct 20th, 2003
Gender: Male
Re: Upload Avatar Mod 1.2 Beta SP1.31
Reply #8 - Nov 29th, 2003 at 10:09pm
Print Post  
I don't know if this is applicable at all; but here's a quote from a thread in new mods sp1.3.1:
Quote:
if ($ENV{CONTENT_TYPE} =~ /multipart\/form-data/) {    
   use CGI qw(:standard); 

The correct form of this code would be:

  if ($ENV{CONTENT_TYPE} =~ /multipart\/form-data/){   
   require CGI; import CGI qw(:standard); 

No matter if you have my mod, the gallery mod, etc. installed or not, you should use that second section of code in place of the first - because the first doesn't get executed correctly since it uses the USE statement (which won't give errors on *nix systems, but will on Windows ... but even on *nix, the USE command totally kills the point of putting it into an IF statement, because anything in a USE statement gets executed before the rest of the code, so you're going to require and import the CGI.pm module everytime ... with the second block of code, you're only going to doad it when it'{ needed).


Source
  

www.smile-jesuslovesyou.org/forum
Message boarding- where everybody is always right


"For I am not ashamed of the gospel of Christ..."
Romans 1:16
Back to top
WWW  
IP Logged
 
louisle
God Member
*****
Offline


With a little bit of love
everything goes better

Posts: 1124
Location: Muenchen
Joined: Apr 9th, 2003
Gender: Male
Re: Upload Avatar Mod 1.2 Beta SP1.31
Reply #9 - Nov 30th, 2003 at 12:58am
Print Post  
in the gallery mod we tried
Code
Select All
use CGI qw(:standard); 


but it was slower and at windowsservers sometimes it hang out.
i didn't try
Code
Select All
require CGI; import CGI qw(:standard); 


maybe it is better, so please could somebody try it out and tell it here please ?

greetings
louisle
  

I LIKE SAUSAGE FINGERS:2thumbsup::2thumbsup::2thumbsup::2thumbsup::2thumbsup:
Back to top
IP Logged
 
louisle
God Member
*****
Offline


With a little bit of love
everything goes better

Posts: 1124
Location: Muenchen
Joined: Apr 9th, 2003
Gender: Male
Re: Upload Avatar Mod 1.3 Beta SP1.31
Reply #10 - Dec 6th, 2003 at 1:33pm
Print Post  
it works, i updated the mod.
  

I LIKE SAUSAGE FINGERS:2thumbsup::2thumbsup::2thumbsup::2thumbsup::2thumbsup:
Back to top
IP Logged
 
Tlab5_44
New Member
*
Offline


I love YaBB 1G - SP1.2!

Posts: 15
Joined: Sep 24th, 2003
Re: Upload Avatar Mod 1.3 Beta SP1.31
Reply #11 - Dec 7th, 2003 at 1:09am
Print Post  
it is not uploading at all

It is actually putting a check in the "i have a pic" box and adding my Forum username as the filename

and using the extension of the file i choose to upload

any sugg.?
  
Back to top
 
IP Logged
 
louisle
God Member
*****
Offline


With a little bit of love
everything goes better

Posts: 1124
Location: Muenchen
Joined: Apr 9th, 2003
Gender: Male
Re: Upload Avatar Mod 1.3 Beta SP1.31
Reply #12 - Dec 7th, 2003 at 1:42am
Print Post  
@Tlab5_44:
that's right, but if you did everything right ( setup and create the personal avatar folder ) and click at SAVE Profile your picture should appear as your avatar.

greetings
louisle
  

I LIKE SAUSAGE FINGERS:2thumbsup::2thumbsup::2thumbsup::2thumbsup::2thumbsup:
Back to top
IP Logged
 
Smigma
Guest


Re: Upload Avatar Mod 1.3 Beta SP1.31
Reply #13 - Dec 11th, 2003 at 1:57am
Print Post  
OK, I'm stupid.  I have the attachments mod working.  Could you explain exactly where i need to add the posted code to the Subs.pl file?

Not a modder at all. Sad
  
Back to top
 
IP Logged
 
louisle
God Member
*****
Offline


With a little bit of love
everything goes better

Posts: 1124
Location: Muenchen
Joined: Apr 9th, 2003
Gender: Male
Re: Upload Avatar Mod 1.3 Beta SP1.31
Reply #14 - Dec 11th, 2003 at 2:10am
Print Post  
@Smigma:
maybe you are not stupid, but a little bit blind ? take a look on post #1 or into the .mod file itself. Or didn't you understand it ?
  

I LIKE SAUSAGE FINGERS:2thumbsup::2thumbsup::2thumbsup::2thumbsup::2thumbsup:
Back to top
IP Logged
 
Page Index Toggle Pages: [1] 2 3 ... 14
Send TopicPrint