Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Admin Avatar Options Details »»
Admin Avatar Options
Version: 1.00, by Neo Neo is offline
Developer Last Online: Dec 2009 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 04-27-2002 Last Update: Never Installs: 8
 
No support by the author.

This is a add that Dark Angelus requested and something that I wanted but could not find >< I am not to sure if this is already made but here it is.

Info:
This allows admins/smods/mods to have a bigger set avatar and avatar file size from the admin cp. Aswell as make it so it can define the width and height of the avatar.

Install Info:
3 New queries
1 new template
1 template edit
1 file edit


Hope you enjoy

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 09-16-2002, 03:12 PM
scud scud is offline
 
Join Date: Aug 2002
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great Hack, thx, I'll use it
Reply With Quote
  #13  
Old 09-22-2002, 11:29 PM
Jalrock Jalrock is offline
 
Join Date: Dec 2001
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

.
Reply With Quote
  #14  
Old 09-23-2002, 05:35 PM
Jalrock Jalrock is offline
 
Join Date: Dec 2001
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Never mind.
Reply With Quote
  #15  
Old 09-26-2002, 05:32 PM
Jalrock Jalrock is offline
 
Join Date: Dec 2001
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Something is still wrong. The specified usergroupes can use the admin avatar size but now the regular members can not change their avatars. It says thankyou for modifing your profile..... but nothing happens. No error message or anything! Please help.
This is the portion of code I suspect to be in error.
-----------------------------------------------------------------------
Code:
           // ##### Admin / Mod Diff Upload Size
          if ($bbuserinfo[usergroupid]==6 || $bbuserinfo[usergroupid]==7 || $bbuserinfo[usergroupid]==5 || $bbuserinfo[usergroupid]==8 || $bbuserinfo[usergroupid]==11) {
            if ($imginfo[0]>$amw or $imginfo[1]>$amh) {
              eval("standarderror(\"".gettemplate("error_aabd")."\");");
            }
          } else {
            if ($imginfo[0]>$avatarmaxdimension or $imginfo[1]>$avatarmaxdimension) {
              eval("standarderror(\"".gettemplate("error_avatarbaddimensions")."\");");
            }
          }
          // ##### Admin / Mod Diff Upload Size

          }
          if ($imginfo[2] != 1 and $imginfo[2] != 2 and $imginfo[2] != 3) {
            @unlink($filename);
            eval("standarderror(\"".gettemplate("error_avatarnotimage")."\");");
          }
        } else {
          if (1 or !$allowimgsizefailure) {
            @unlink($filename);
            eval("standarderror(\"".gettemplate("error_avatarnotimage")."\");");
          }
        }

        // read file
        $filesize=@filesize($filename);
        if ($bbuserinfo[usergroupid]==6 || $bbuserinfo[usergroupid]==7 || $bbuserinfo[usergroupid]==5 || $bbuserinfo[usergroupid]==8 || $bbuserinfo[usergroupid]==11) {
        if ($filesize>$amfs) {
          eval("standarderror(\"".gettemplate("error_avatartoobig")."\");");
          // file size too big
          
      } else {
        if ($filesize>$avatarmaxsize) {
          eval("standarderror(\"".gettemplate("error_avatartoobig")."\");");
          // file size too big
          exit;
        }
      }


        $filenum=@fopen($filename,"rb");
        $filestuff=@fread($filenum,$filesize);
        @fclose($filenum);

        @unlink($filename);

        if ($avexists=$DB_site->query_first("SELECT userid FROM customavatar WHERE userid=$bbuserinfo[userid]")) {
          $DB_site->query("UPDATE customavatar SET filename='".addslashes($avatarfile_name)."',dateline='".time()."',avatardata='".addslashes($filestuff)."' WHERE userid=$bbuserinfo[userid]");
        } else {
          $DB_site->query("INSERT INTO customavatar (userid,avatardata,dateline,filename) VALUES ($bbuserinfo[userid],'".addslashes($filestuff)."','".time()."','".addslashes($avatarfile_name)."')");
        }
      }
    } else {
      $avatarid=verifyid("avatar",$avatarid);
      $avatarinfo=$DB_site->query_first("SELECT minimumposts FROM avatar WHERE avatarid=$avatarid");
      if ($avatarinfo[minimumposts]>$bbuserinfo[posts]) {
        eval("standarderror(\"".gettemplate("error_avatarmoreposts")."\");");
        // not enough posts error
        exit;
      }
      $DB_site->query("DELETE FROM customavatar WHERE userid=$bbuserinfo[userid]");
    }
  } else {
    $avatarid=0;
    $DB_site->query("DELETE FROM customavatar WHERE userid=$bbuserinfo[userid]");
  }

  $DB_site->query("UPDATE user SET avatarid='".addslashes($avatarid)."',usergroupid='$bbuserinfo[usergroupid]' WHERE userid='$bbuserinfo[userid]'");

  eval("standardredirect(\"".gettemplate("redirect_updatethanks")."\",\"usercp.php?s=$session[sessionhash]\");");

}
Reply With Quote
  #16  
Old 09-26-2002, 05:36 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Jalrock, [code] vb code... it looks more elegant and it keeps the formatting.
is hard for us to look at the code like that. can you reformat it please? thanks.

and now for mad dog neo.. vb225???????????????
you are gonna have a headache on my board neo, there are no avatars...
Reply With Quote
  #17  
Old 09-26-2002, 05:42 PM
Jalrock Jalrock is offline
 
Join Date: Dec 2001
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

reformatted sorry.
Reply With Quote
  #18  
Old 01-30-2003, 11:24 AM
Mono's Avatar
Mono Mono is offline
 
Join Date: Sep 2002
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How would you do it to make it so multiple usergroups can have this feature. Like on my forum there are 3 groups of authority.

The group numbers are 7, 6, and 5.
Reply With Quote
  #19  
Old 03-14-2003, 10:45 AM
geniuscrew's Avatar
geniuscrew geniuscrew is offline
 
Join Date: Nov 2001
Location: UK
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Mmm I have exactly that - are their avatars the same size?
Reply With Quote
  #20  
Old 05-21-2003, 11:13 PM
S.Shady's Avatar
S.Shady S.Shady is offline
 
Join Date: Apr 2003
Location: Cleveland, Ohio
Posts: 179
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i would like to see this with the option of turning off the reg avatars and only alowing admins,etc. the option for an avatar only.

Plz if this hack exists point me to it. i thought i saw one before but cant find one for anything.

Does this work for 2.3.0 ?
Reply With Quote
  #21  
Old 08-10-2003, 04:17 PM
?????p?x???? ?????p?x???? is offline
 
Join Date: Dec 2002
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can this also be utilized to grant moderators and administrators the exclusive right to use avatars? In other words, can this hack help me make the use of avatars a strictly mod/admin perk only?

Bandwidth may pose a problem by the end of my forum's setup, and I was thinking of permitting only authorities this privilege.

Edit: Nevermind. (http://www.vbulletin.org/hacks/index...ack&hackid=251)
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:48 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07276 seconds
  • Memory Usage 2,305KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete