The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Admin Avatar Options Details »» | |||||||||||||||||||||||||
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
|
Comments |
#12
|
|||
|
|||
Great Hack, thx, I'll use it
|
#13
|
|||
|
|||
.
|
#14
|
|||
|
|||
Never mind.
|
#15
|
|||
|
|||
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]\");"); } |
#16
|
||||
|
||||
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... |
#17
|
|||
|
|||
reformatted sorry.
|
#18
|
||||
|
||||
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. |
#19
|
||||
|
||||
Mmm I have exactly that - are their avatars the same size?
|
#20
|
||||
|
||||
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 ? |
#21
|
|||
|
|||
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) |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|