REGISTER or LOGIN to have the annoying ads removed.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Avatar dim for each usergroup 1.6 > 1.8 (Plugin)
#1
So I have this plugin that makes different avatar dimensions for each usergroup. It works on 1.6 but not properly on 1.8

Can someone help me make it work on 1.8?

The code is below:

PHP Code:
<?php

if(!defined("IN_MYBB"))
    die(
"This file cannot be accessed directly.");

$plugins->add_hook("usercp_avatar_start""diffavatardim_run");
$plugins->add_hook("usercp_do_avatar_start""diffavatardim_run");

function 
diffavatardim_info()
{
    return array(
        
'name'            => 'Different Avatar Dimensions',
        
'description'    => 'Allow different usergroups to have different avatar max dimensions.',
        
'version'        => '1.0'
    
);
}

function 
diffavatardim_run()
{
    global 
$mybb;
    switch(
$mybb->user['usergroup'])
    {
        case 
'4'// admins
            
$mybb->settings['maxavatardims'] = '100x100'// no limit
            
break;
        case 
'3'// Super Moderators
            
$mybb->settings['maxavatardims'] = '90x80';
            break;
        case 
'6'// Sectional Moderators
            
$mybb->settings['maxavatardims'] = '90x90';
            break;
           case 
'2'// Regular Members
            
$mybb->settings['maxavatardims'] = '90x70';
            break;
        case 
'9'// Upgraded Members
            
$mybb->settings['maxavatardims'] = '90x70';
            break;

    }
}
?>
Reply


Messages In This Thread
Avatar dim for each usergroup 1.6 > 1.8 (Plugin) - by X-Shadow - May 01, 2015, 05:29 AM

Possibly Related Threads...
Thread Author Replies Views Last Post
  How to disable negative rep for a certain usergroup? Dolan 9 4,094 Aug 21, 2017, 07:42 AM
Last Post: Frances
Exclamation bans.php Plugin? Salsut 14 8,449 Jul 03, 2017, 08:15 PM
Last Post: Farrahs
  mytab plugin does not function on my theme bushido 1 1,399 Jul 04, 2016, 11:01 PM
Last Post: Prince Tony
  Really need a plugin that blocks proxys getxoan 0 1,138 Nov 10, 2015, 07:32 PM
Last Post: getxoan
  proxy blocking plugin mybb 1.8x omfgomfg 1 1,755 Jul 06, 2015, 07:04 AM
Last Post: Nisva

Forum Jump:


Users browsing this thread: 1 Guest(s)