Welcome, Guest. Please Login or Register.
May 02, 2025, 10:44:47 PM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Avatars « previous next »
Pages: [1] Reply Ignore Print
Author Topic: Avatars  (Read 934 times)
Lonestar
Jr. Member
**
Posts: 87


SchwartzMaster

ICQ - 57595208 WWW
Avatars
« on: April 20, 2002, 04:25:07 PM »
Reply with quote

We need an avatar MOD which allows us to set a MAX size but you are able to use that size PLUS anything below it. Kinda sux to force poeple to use ONE size.

Alternatively we can force members to send us their pics and we can put them in the avatar folder to select of the list in their profile, but other then that there is no flexibility.
Logged

Decaffeinated Jedi
Noobie
*
Posts: 8


I'm a llama!

Re:Avatars
« Reply #1 on: April 21, 2002, 10:03:20 PM »
Reply with quote

I have to agree that this would be a very valuable mod. Similarly, phpBB2 has a great feature that allows users to upload avatars to the forum's server, which is a nice touch. Any chance of someone working something along these lines up for YaBBSE?

Best wishes!

DecafJedi
Logged
Big P
Mod Team
YaBB God
*****
Posts: 1462


"Back in '68, I don't like you, The End."

ICQ - 76064555pierceward@hotmail.com WWW
Re:Avatars
« Reply #2 on: April 22, 2002, 05:30:46 PM »
Reply with quote

Easy  ;). Work off this:

if ($userpicpersonalcheck) {
$maxsize = "200";
$size = GetImageSize ("$userpicpersonal");
if ($size[3] > $maxsize) {
    die("Your Image is too big. Only images small than $maxsize are allowed."); }}

They are the right variables, you'll just have to place that in the right part of the script.
Just so you know thats in the ModifyProfile2 section of Profile.php ;)
Logged

PHPNews has been released!!! Download it now!!!
Lonestar
Jr. Member
**
Posts: 87


SchwartzMaster

ICQ - 57595208 WWW
Re:Avatars
« Reply #3 on: April 22, 2002, 07:11:04 PM »
Reply with quote

Im no PHP editor, but im sure i can find the right way to implement what you've given me here.

Unless you have it in mod form, otherwise dont worry ill figure it out.  :)

Logged

Lonestar
Jr. Member
**
Posts: 87


SchwartzMaster

ICQ - 57595208 WWW
Re:Avatars
« Reply #4 on: April 23, 2002, 04:09:01 AM »
Reply with quote

HELP!

function ModifyProfile2 (){
   global $HTTP_POST_VARS,$username,$settings,$txt,$allowpics,$emailnewpass,$MaxSigLen,$Cookie_Length;
   global $newpassemail,$yySetCookies,$password,$realname,$realemail,$pwseed,$cookieusername,$cookiepassword;
   global $usertimeoffset,$userID,$sourcedir,$scripturl,$cgi,$boardurl,$db_prefix,$yySetLocation,$modSettings,$timeoffset;
   global $usertitle,$REMOTE_ADDR, $userpic_width, $userpic_height;
   foreach ($HTTP_POST_VARS as $key=>$value)
      $member[$key]=str_replace(array("&","\"","<",">"),array('&amp','&quot','&lt','&gt'),trim($value));

   # make sure this person has access to this profile
   if($username != $member['user'] && $settings[7] != 'Administrator')
      fatal_error($txt[80]);

   $karmaStr = '';
   if( $settings[7] != 'Administrator' )
   {
      $member['user'] = $username;
      $member['settings6'] = $settings[6];
      $member['settings7'] = $settings[7];
   }
   elseif ($settings[7] == 'Administrator' && $modSettings['karmaMode'] != 0)
   {
      $karmaStr = ",karmaGood='$member[karmaGood]',karmaBad='$member[karmaBad]'";
   }
   if(!is_numeric($member['settings6'])) { fatal_error("$txt[749]"); }
   $user = $member['user'];
   if( isset($member['userpicpersonalcheck']) )
   {
      $member['userpic'] = $member['userpicpersonal'];
      // now let's validate the avatar

      $sizes = @getimagesize($member['userpic']);
      if ($sizes)
      {
         if (($sizes[0] > $userpic_width && $userpic_width != 0) ||
            ($sizes[1] > $userpic_height && $userpic_height != 0))
         
         fatal_error("$txt[yse227]  $userpic_width x $userpic_height)");
       
      }
   }

   if($member['userpic'] == "") { $member['userpic'] = "blank.gif"; }
   if(!$allowpics) { $member['userpic'] = "blank.gif"; }
   $queryPasswdPart = '';
   mt_srand(34028934023); //pseudo-random seed
   if( $member['passwrd1'] == '' && $emailnewpass && strtolower($member['email']) != strtolower($settings[2]) && $settings[7] != 'Administrator') {
      $member['passwrd1'] = crypt(mt_rand(-100000,100000));
      $newpassemail = 1;
   } else {
      if($member['passwrd1'] != $member['passwrd2']){ fatal_error("($member[username]) $txt[213]"); }
      if($member['passwrd1'] != ''){ $queryPasswdPart="passwd='".crypt($member['passwrd1'], substr($member['passwrd1'],0,2))."',"; }
   }
   if($member['name'] == ''){ fatal_error("$txt[75]");}
   if($member['email'] == '') { fatal_error("$txt[76]"); }
   if(!preg_match("/^[0-9A-Za-z@\._\-]+$/",$member['email'])){ fatal_error("$txt[243]"); }
   if(preg_match("/(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)|(\.$)/",$member['email'])){ fatal_error("$txt[500]"); }

I didnt see anything like what you mentioned above. I saw some things close to it but was afeared  :o

If you could take the snippet i gave you above and edit it to look like what its supposed to be with what you told me to put in then me and 47 other members of my board would be forever grateful.

Thanks
Logged

Webby
Beta Tester
YaBB God
*****
Posts: 829


Some mistakes are too funny to make only once.

ICQ - 9814812webby@salesplaza.nl WWW
Re:Avatars
« Reply #5 on: April 23, 2002, 01:16:36 PM »
Reply with quote

Would it keep the right aspect ratio (will it be resized by %) ?
Logged

Webby of salesplaza.nl
The YaBBSE buttongenerator : Click HERE !
Big P
Mod Team
YaBB God
*****
Posts: 1462


"Back in '68, I don't like you, The End."

ICQ - 76064555pierceward@hotmail.com WWW
Re:Avatars
« Reply #6 on: April 23, 2002, 07:07:01 PM »
Reply with quote

Search for userpicpersonal. Thats the vriable. I'll look later if you want.
Webby this just makes sure the file is a sertain size. Everything else is done by yabb. This just makes it better, not removing anything already in yabb ;)
Logged

PHPNews has been released!!! Download it now!!!
Webby
Beta Tester
YaBB God
*****
Posts: 829


Some mistakes are too funny to make only once.

ICQ - 9814812webby@salesplaza.nl WWW
Re:Avatars
« Reply #7 on: April 23, 2002, 07:11:14 PM »
Reply with quote

Ok thanx.  It would be a great addon.
Logged

Webby of salesplaza.nl
The YaBBSE buttongenerator : Click HERE !
-Tom-
Noobie
*
Posts: 40


YaBB loves me !

ICQ - 55606046tom@verboon.net
Re:Avatars
« Reply #8 on: April 24, 2002, 06:37:59 PM »
Reply with quote

Where exactly do we have to place it ???
After what ?? Or copy over what ?? :-\
Logged

Greetz,
Tom

--Nederlander in hart en nieren!---
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Avatars « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.090 seconds with 20 queries.