Dołącz do zespołu ekspertów! Backend lub Frontend Developer?

Sprawdź najnowsze oferty pracy naszego partnera - 8lines.io!

Popsute Avatary

Błąd   Założony przez  Prom.

wersja skryptu MyBB: 1.84
adres forum: throwfrags.pl
na czym polega problem (screen, opis, komunikaty, nazwa stylu/theme/szablonu): http://scr.hu/4gy7/gf9ph

Wgrałem wszędzie gdzie trzebabyło default_avatar.png

Jest taki : http://scr.hu/4gy7/gf9ph

A ja chce żeby był taki: http://i.imgur.com/fRsTQiy.png

Co mam zrobić ? Z góry dzięki!
CTRL + F5, u mnie wszystko jest okej. Jest nowy awatar.
Pomoc poza forum - odpłatnie.
Nie ma sprawdź ten link i pojedź troszku niżej :)
http://throwfrags.pl/member.php?action=profile&uid=2
A no to pisz gdzie, myślałem że chodzi ci o strone głowną. Tak jakby plugin nie wykrywa Ci w ogóle tam linku/odniesienia do awataru.

[Obrazek: VZb0DNh.png]

Zobacz w ustawieniach pluginu czy masz gdzieś do podania odnośnik do domyślnego awatara. Nie korzystałem z tego pluginu.
Pomoc poza forum - odpłatnie.
Na stronie głównej też jest taki problem w topstats zauważ że "Pyskaty" w top Shoutersów nie ma avatara, a w reputacji ma :)
Pokaż ten plik od top shoutersów.
Prośby na PW dotyczące wsparcia z problemami będą ignorowane. Pomoc poza forum - odpłatna; kontakt: snakemybboard@gmail.com.
TOP SHOUTS

<?php
if(!defined('IN_MYBB'))
{
    die(
'This file cannot be accessed directly.');
}

$plugins->add_hook("index_end""topshout_show");
$plugins->add_hook("portal_end""topshout_show"); 

function 
topshout_info()
{
    global 
$lang$mybb$db;
    
$lang->load("topshout");
    
    return array(
        
"name"        => $lang->name,
        
"description"        => $lang->desc,
        
"website"        => "http://www.mybboad.pl",
        
"author"        => "GiboneKPL & Supryk",
        
"authorsite"        => "http://www.rashownia.pl",
        
"version"        => "1.4.0",
        
"guid"             => "*",
        
"compatibility"    => "18*"
        
);
}


function 
topshout_install()
{
    global 
$mybb$db$lang;
    
$lang->load("topshout");
    
    
$settinggroups = array(
        
'name'             => 'topshout'
        
'title'                 => $db->escape_string($lang->name),
        
'description'     => $db->escape_string($lang->settings_desc),
        
'disporder'         => 100
        
'isdefault'         => 0
    
);
    
$gid $db->insert_query("settinggroups"$settinggroups);
    
$disporder 0;

    
$setting = array(
        
"sid"                    => NULL,
        
"name"            => "topshoutlimit",
        
"title"                => $db->escape_string($lang->settings_limit),
        
"description"    => $db->escape_string($lang->settings_limit_desc),
        
"optionscode"    => "text",
        
"value"                => '5',
        
"disporder"        => $disporder++,
        
"gid"                    => $gid
    
);
    
$db->insert_query("settings"$setting);
    
    
$setting = array(
        
"sid"                    => NULL,
        
"name"            => "topshoutshoutbox",
        
"title"                => $db->escape_string($lang->settings_shoutbox),
        
"description"    => $db->escape_string($lang->settings_shoutbox_desc),
        
"optionscode"    => "select
dvzshoutbox=DVZ Shoutbox
myshoutbox=MyShoutbox
sfshoutbox=SpiceFuse Shoutbox"
,
        
"value"                => 'dvzshoutbox',
        
"disporder"        => $disporder++,
        
"gid"                    => $gid
    
);
    
$db->insert_query("settings"$setting);
    
    
$setting = array(
            
'sid' => 'NULL',
            
'name' => 'topshoutignore',
            
'title' => $db->escape_string($lang->settings_ignore_groups),
            
'description' =>  $db->escape_string($lang->settings_ignore_groups_desc),
            
'optionscode' => 'text',
            
'value' => '5,7',
            
'disporder' => $disporder++,
            
'gid' => $gid
    
);
    
$db->insert_query('settings'$setting);
    
    
$setting = array(
        
"sid"                    => NULL,
        
"name"            => "topshoutcolor",
        
"title"                => $db->escape_string($lang->settings_color),
        
"description"    => $db->escape_string($lang->settings_color_desc),
        
"optionscode"    => "text",
        
"value"                => '#7ba60d',
        
"disporder"        => $disporder++,
        
"gid"                    => $gid
    
);
    
$db->insert_query("settings"$setting);
    
    
$setting = array(
        
"sid"                    => NULL,
        
"name"            => "topshoutcoll",
        
"title"                => $db->escape_string($lang->settings_collapse),
        
"description"    => $db->escape_string($lang->settings_collapse_desc),
        
"optionscode"    => "yesno",
        
"value"                => '1',
        
"disporder"        => $disporder++,
        
"gid"                    => $gid
    
);
    
$db->insert_query("settings"$setting);
    
    
rebuild_settings(); 

    
$template = array(
        
"tid"             => "NULL",
        
"title"         => "topshout",
        
"template"        => $db->escape_string('<style type="text/css">
.top_shout {
display: inline-block;
height: 16px;
line-height: 16px;
padding: 0 5px;
font-size: 9px;
font-weight: bold;
text-transform: uppercase;
color: #fff;
text-shadow: rgba(0,0,0,0.2) 0px -1px 0px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
background-image: url(images/highlight.png);
background-repeat: repeat-x;
background-position: 0 -1px;
}
</style>
                                               
<table border="0" cellspacing="{$theme[borderwidth]}" cellpadding="{$theme[tablespace]}" class="tborder" style="clear: both; border-bottom-width: 0;">
<tr>
<td class="thead" colspan="2">
{$collapse}
<strong>{$lang->name}</strong>
</td>
</tr>
<tbody style="{$expdisplay}" id="shouters_e">
{$topshout_row}
</tbody>
</table>
<br />'
),
        
"sid"             => "-1"
        );
        
$db->insert_query("templates"$template);
        
    
$template = array(
        
"tid"             => "NULL",
        
"title"         => "topshout_row",
        
"template"        => $db->escape_string('<tr><td class="trow2">
{$shout[\'avatar\']}
{$shout[\'profilelink\']}
<span style="float: right;margin-right: 5px;margin-top: 7px;background: {$color}" class="top_shout">{$shout[\'shouts\']}</span>
</td></tr'
),
        
"sid"             => "-1"
        );
        
$db->insert_query("templates"$template);
}


function 
topshout_is_installed()
{
    global 
$db$lang$mybb;
    
$lang->load("topshout");
    
    
$q $db->simple_select('settinggroups''*''name=\'topshout\'');
    
$group $db->fetch_array($q);
    if(
$group === null || empty($group))
    return 
false;
    return 
true;
}

function 
topshout_uninstall()
{
    global 
$mybb$db$lang;
    
$lang->load("topshout");
    
    
$db->delete_query("settinggroups""name = 'topshout'");
    
$db->delete_query('settings''name LIKE \'%topshout%\'');
    
$db->delete_query('templates''title LIKE (\'%topshout%\')');


function 
topshout_show()
{
    global 
$db$mybb$page$topshout$theme$templates$shout$topshout_row$lang;
    
$lang->load("topshout");
        
    
$gibek_pinek FALSE;
    
    
$ignore_groups $mybb->settings['topshoutignore'];
    if(
$ignore_groups == '')
    {
            
$ignore_groups '9999999';
    }
        
    if(
$mybb->settings['topshoutshoutbox'] == 'dvzshoutbox')
    {
        if (!
$db->table_exists("dvz_shoutbox"))        
        {
            
$topshout_row '<tr><td class="trow2">'.$lang->install_dvz.'</td></tr>';
        }
        else
        {
            
$gibek_pinek TRUE;
            
$query $db->query("SELECT s.uid, u.username, u.usergroup, u.displaygroup, u.uid, u.avatar, count(*) as totalshouts 
                                 FROM "
.TABLE_PREFIX."dvz_shoutbox s
                                    LEFT JOIN "
.TABLE_PREFIX."users u ON (u.uid=s.uid)
                                 WHERE usergroup NOT IN("
.$ignore_groups.")
                                 GROUP BY s.uid 
                                 ORDER BY totalshouts 
                                 DESC LIMIT " 
$mybb->settings['topshoutlimit']);
        }
                             
    }
    elseif(
$mybb->settings['topshoutshoutbox'] == 'myshoutbox')
    {    
        if (!
$db->table_exists("mysb_shouts"))        
        {
            
$topshout_row '<tr><td class="trow2">'.$lang->install_mysb.'</td></tr>';
        }
        else
        {
            
$gibek_pinek TRUE;
            
$query $db->query("SELECT s.uid, u.username, u.usergroup, u.displaygroup, u.uid, u.avatar, count(*) as totalshouts 
                                 FROM "
.TABLE_PREFIX."mysb_shouts s
                                 LEFT JOIN "
.TABLE_PREFIX."users u ON (u.uid=s.uid)
                                 WHERE usergroup NOT IN("
.$ignore_groups.")
                                 GROUP BY s.uid 
                                 ORDER BY totalshouts 
                                 DESC LIMIT " 
$mybb->settings['topshoutlimit']);
        }                             
    }
    elseif(
$mybb->settings['topshoutshoutbox'] == 'sfshoutbox')
    {
        if (!
$db->table_exists("sf_shouts"))        
        {
            
$topshout_row '<tr><td class="trow2">'.$lang->install_sfsb.'</td></tr>';
        }
        else
        {
            
$gibek_pinek TRUE;
            
$query $db->query("SELECT s.uid, u.username, u.usergroup, u.displaygroup, u.uid, u.avatar, count(*) as totalshouts 
                                 FROM "
.TABLE_PREFIX."sf_shouts s
                                 LEFT JOIN "
.TABLE_PREFIX."users u ON (u.uid=s.uid)
                                 WHERE usergroup NOT IN("
.$ignore_groups.")
                                 GROUP BY s.uid 
                                 ORDER BY totalshouts 
                                 DESC LIMIT " 
$mybb->settings['topshoutlimit']);
        }                
    }

    if( 
$gibek_pinek == TRUE )
    {    
        while(
$shout $db->fetch_array($query))
        {
                            
$shout['username'] = format_name($shout['username'], $shout['usergroup'], $shout['displaygroup']);
                            
$shout['profilelink'] = build_profile_link($shout['username'], $shout['uid']);
                            
$shout['shouts'] = $shout['totalshouts']; 
                            
$shout['avatar'] = '<img src="'.htmlspecialchars_uni($shout['avatar']).'" width="35" height="35" style="margin-right: 5px;float: left;"/>';
                            
                            
$color $mybb->settings['topshoutcolor'];
                            
                eval(
'$topshout_row .= "'.$templates->get("topshout_row").'";');
        }
    }
    if(
$mybb->settings['topshoutcoll'] == '1')
    {
    
$collapse '<div class="expcolimage"><img src="images/collapse.gif" id="shouters_img" class="expander" alt="{$expaltext}" title="{$expaltext}" /></div>';
    }
    
eval(
'$topshout = "'.$templates->get('topshout').'";');
}
?>


Last Visitors
<?php
//*************************************//
//*************************************//
//*********** Last Visitors ************//
//*************************************//
//*************************************//


// Disallow direct access to this file for security reasons
if(!defined("IN_MYBB"))
{
    die(
"Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}

$plugins->add_hook("member_profile_end""lastvisitors_profile");



function 
lastvisitors_info()
{
    return array(
'name'          => 'Last Visitors in Profile',
                 
'description'   => 'Add a Box in Users Profiles with Last 10 Users Have Visit It',
                 
'website'       => '',
                 
'author'        => 'LLNN',
                 
'authorsite'    => '',
                 
'version'       => '1.1',
                 
'compatibility' => '1*',
                 
'guid'           => '9e2233dc1d258ae05ecba084c4b0dda6'
                
);
}

function 
lastvisitors_activate()
{

global 
$mybb$db$templates;

require 
MYBB_ROOT.'/inc/adminfunctions_templates.php';

$sql ="CREATE TABLE `".TABLE_PREFIX."lastvisitor` (
`uid` VARCHAR( 10 ) NOT NULL ,
`vid` VARCHAR( 10 ) NOT NULL ,
`time` VARCHAR( 50 ) NOT NULL
) ENGINE = MYISAM ;"
;

$db->write_query($sql);

$template1 = array("title"        => "userprofile_lastvisit",
        
"template"    => "<br />
<table border=\"0\" cellspacing=\"{\$theme\[\'borderwidth\'\]}\" cellpadding=\"{\$theme\[\'tablespace\'\]}\" class=\"tborder\" style=\"border: #393939 solid 1px;\">
<tr>
<td colspan=\"2\" style=\"width: 100%;\"class=\"tcat\"><strong>Ostatnio byli</strong></td>
{\$lastvisitor}
</tr>
</tr>
</table>"
,"sid"        => -1);

$db->insert_query("templates"$template1);

find_replace_templatesets('member_profile''#{\$modoptions}#'"{\$modoptions}
{\$last_visit}"
);

}


function 
lastvisitors_deactivate()
{

global 
$mybb$db$templates;

$sql ="DROP TABLE `mybb_lastvisitor`;";

$db->write_query($sql);

require 
MYBB_ROOT.'/inc/adminfunctions_templates.php';

find_replace_templatesets('member_profile''#\{\$last_visit\}#'''0);

$db->delete_query("templates","title IN('userprofile_lastvisit')");

}

function 
lastvisitors_profile(){

global 
$mybb$db$templates$theme$lastvisitor$memprofile$last_visit ;

$myuid $memprofile['uid'];
$vuid $mybb->user['uid'];

$query $db->simple_select('lastvisitor''*'"uid='".$myuid."' and vid='".$vuid."'");

$nr $db->num_rows($query);

IF(
$vuid != "0" and $vuid != $myuid ){

$tt time();

IF(
$nr<1){
$db->write_query("INSERT INTO `".TABLE_PREFIX."lastvisitor` VALUES ('$myuid', '$vuid','$tt')");
}else{
$db->update_query("lastvisitor", array('time' => $tt),  "uid='".$myuid."' and vid='".$vuid."'");
}

}

$query $db->query('SELECT * FROM ' TABLE_PREFIX 'lastvisitor,' TABLE_PREFIX 'users WHERE ' TABLE_PREFIX 'users.uid=' TABLE_PREFIX 'lastvisitor.vid AND ' TABLE_PREFIX 'lastvisitor.uid='.$myuid.'  ORDER BY ' TABLE_PREFIX 'lastvisitor.time DESC LIMIT 10;');


while(
$row $db->fetch_array($query)){

$u $row['vid'];
$un get_user($u);

if(
$un!=""){

$date my_date($mybb->settings['dateformat'], $row['time']);
$time my_date($mybb->settings['timeformat'], $row['time']);

$avatar '<img src="' $row['avatar'] . '" style="max-width: 35px; max-height: 35px;float:left;/>';

$username format_name($row['username'], $row['usergroup'], $row['displaygroup']);
$username build_profile_link($username$row['uid']);

$lastvisitor $lastvisitor."<tr><td class=\"trow1\">".$avatar."</td><td class=\"trow1\">".$username." <br />".$date." - ".$time." </td></tr>";
}

}


eval(
"\$last_visit = \"".$templates->get("userprofile_lastvisit")."\";"); 

}

?>
Top Shouters:
<?php
if(!defined('IN_MYBB'))
{
    die(
'This file cannot be accessed directly.');
}

$plugins->add_hook("index_end""topshout_show");
$plugins->add_hook("portal_end""topshout_show"); 

function 
topshout_info()
{
    global 
$lang$mybb$db;
    
$lang->load("topshout");
    
    return array(
        
"name"        => $lang->name,
        
"description"        => $lang->desc,
        
"website"        => "http://www.mybboad.pl",
        
"author"        => "GiboneKPL & Supryk",
        
"authorsite"        => "http://www.rashownia.pl",
        
"version"        => "1.4.0",
        
"guid"             => "*",
        
"compatibility"    => "18*"
        
);
}


function 
topshout_install()
{
    global 
$mybb$db$lang;
    
$lang->load("topshout");
    
    
$settinggroups = array(
        
'name'             => 'topshout'
        
'title'                 => $db->escape_string($lang->name),
        
'description'     => $db->escape_string($lang->settings_desc),
        
'disporder'         => 100
        
'isdefault'         => 0
    
);
    
$gid $db->insert_query("settinggroups"$settinggroups);
    
$disporder 0;

    
$setting = array(
        
"sid"                    => NULL,
        
"name"            => "topshoutlimit",
        
"title"                => $db->escape_string($lang->settings_limit),
        
"description"    => $db->escape_string($lang->settings_limit_desc),
        
"optionscode"    => "text",
        
"value"                => '5',
        
"disporder"        => $disporder++,
        
"gid"                    => $gid
    
);
    
$db->insert_query("settings"$setting);
    
    
$setting = array(
        
"sid"                    => NULL,
        
"name"            => "topshoutshoutbox",
        
"title"                => $db->escape_string($lang->settings_shoutbox),
        
"description"    => $db->escape_string($lang->settings_shoutbox_desc),
        
"optionscode"    => "select
dvzshoutbox=DVZ Shoutbox
myshoutbox=MyShoutbox
sfshoutbox=SpiceFuse Shoutbox"
,
        
"value"                => 'dvzshoutbox',
        
"disporder"        => $disporder++,
        
"gid"                    => $gid
    
);
    
$db->insert_query("settings"$setting);
    
    
$setting = array(
            
'sid' => 'NULL',
            
'name' => 'topshoutignore',
            
'title' => $db->escape_string($lang->settings_ignore_groups),
            
'description' =>  $db->escape_string($lang->settings_ignore_groups_desc),
            
'optionscode' => 'text',
            
'value' => '5,7',
            
'disporder' => $disporder++,
            
'gid' => $gid
    
);
    
$db->insert_query('settings'$setting);
    
    
$setting = array(
        
"sid"                    => NULL,
        
"name"            => "topshoutcolor",
        
"title"                => $db->escape_string($lang->settings_color),
        
"description"    => $db->escape_string($lang->settings_color_desc),
        
"optionscode"    => "text",
        
"value"                => '#7ba60d',
        
"disporder"        => $disporder++,
        
"gid"                    => $gid
    
);
    
$db->insert_query("settings"$setting);
    
    
$setting = array(
        
"sid"                    => NULL,
        
"name"            => "topshoutcoll",
        
"title"                => $db->escape_string($lang->settings_collapse),
        
"description"    => $db->escape_string($lang->settings_collapse_desc),
        
"optionscode"    => "yesno",
        
"value"                => '1',
        
"disporder"        => $disporder++,
        
"gid"                    => $gid
    
);
    
$db->insert_query("settings"$setting);
    
    
rebuild_settings(); 

    
$template = array(
        
"tid"             => "NULL",
        
"title"         => "topshout",
        
"template"        => $db->escape_string('<style type="text/css">
.top_shout {
display: inline-block;
height: 16px;
line-height: 16px;
padding: 0 5px;
font-size: 9px;
font-weight: bold;
text-transform: uppercase;
color: #fff;
text-shadow: rgba(0,0,0,0.2) 0px -1px 0px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
background-image: url(images/highlight.png);
background-repeat: repeat-x;
background-position: 0 -1px;
}
</style>
                                               
<table border="0" cellspacing="{$theme[borderwidth]}" cellpadding="{$theme[tablespace]}" class="tborder" style="clear: both; border-bottom-width: 0;">
<tr>
<td class="thead" colspan="2">
{$collapse}
<strong>{$lang->name}</strong>
</td>
</tr>
<tbody style="{$expdisplay}" id="shouters_e">
{$topshout_row}
</tbody>
</table>
<br />'
),
        
"sid"             => "-1"
        );
        
$db->insert_query("templates"$template);
        
    
$template = array(
        
"tid"             => "NULL",
        
"title"         => "topshout_row",
        
"template"        => $db->escape_string('<tr><td class="trow2">
<img src="{$avatar[\'image\']}" alt="" title="" />
{$shout[\'profilelink\']}
<span style="float: right;margin-right: 5px;margin-top: 7px;background: {$color}" class="top_shout">{$shout[\'shouts\']}</span>
</td></tr'
),
        
"sid"             => "-1"
        );
        
$db->insert_query("templates"$template);
}


function 
topshout_is_installed()
{
    global 
$db$lang$mybb;
    
$lang->load("topshout");
    
    
$q $db->simple_select('settinggroups''*''name=\'topshout\'');
    
$group $db->fetch_array($q);
    if(
$group === null || empty($group))
    return 
false;
    return 
true;
}

function 
topshout_uninstall()
{
    global 
$mybb$db$lang;
    
$lang->load("topshout");
    
    
$db->delete_query("settinggroups""name = 'topshout'");
    
$db->delete_query('settings''name LIKE \'%topshout%\'');
    
$db->delete_query('templates''title LIKE (\'%topshout%\')');


function 
topshout_show()
{
    global 
$db$mybb$page$topshout$theme$templates$shout$topshout_row$lang;
    
$lang->load("topshout");
        
    
$gibek_pinek FALSE;
    
    
$ignore_groups $mybb->settings['topshoutignore'];
    if(
$ignore_groups == '')
    {
            
$ignore_groups '9999999';
    }
        
    if(
$mybb->settings['topshoutshoutbox'] == 'dvzshoutbox')
    {
        if (!
$db->table_exists("dvz_shoutbox"))        
        {
            
$topshout_row '<tr><td class="trow2">'.$lang->install_dvz.'</td></tr>';
        }
        else
        {
            
$gibek_pinek TRUE;
            
$query $db->query("SELECT s.uid, u.username, u.usergroup, u.displaygroup, u.uid, u.avatar, count(*) as totalshouts 
                                 FROM "
.TABLE_PREFIX."dvz_shoutbox s
                                    LEFT JOIN "
.TABLE_PREFIX."users u ON (u.uid=s.uid)
                                 WHERE usergroup NOT IN("
.$ignore_groups.")
                                 GROUP BY s.uid 
                                 ORDER BY totalshouts 
                                 DESC LIMIT " 
$mybb->settings['topshoutlimit']);
        }
                             
    }
   
/* elseif($mybb->settings['topshoutshoutbox'] == 'myshoutbox')
    {    
        if (!$db->table_exists("mysb_shouts"))        
        {
            $topshout_row = '<tr><td class="trow2">'.$lang->install_mysb.'</td></tr>';
        }
        else
        {
            $gibek_pinek = TRUE;
            $query = $db->query("SELECT s.uid, u.username, u.usergroup, u.displaygroup, u.uid, u.avatar, count(*) as totalshouts 
                                 FROM ".TABLE_PREFIX."mysb_shouts s
                                 LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=s.uid)
                                 WHERE usergroup NOT IN(".$ignore_groups.")
                                 GROUP BY s.uid 
                                 ORDER BY totalshouts 
                                 DESC LIMIT " . $mybb->settings['topshoutlimit']);
        }                             
    }
    elseif($mybb->settings['topshoutshoutbox'] == 'sfshoutbox')
    {
        if (!$db->table_exists("sf_shouts"))        
        {
            $topshout_row = '<tr><td class="trow2">'.$lang->install_sfsb.'</td></tr>';
        }
        else
        {
            $gibek_pinek = TRUE;
            $query = $db->query("SELECT s.uid, u.username, u.usergroup, u.displaygroup, u.uid, u.avatar, count(*) as totalshouts 
                                 FROM ".TABLE_PREFIX."sf_shouts s
                                 LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=s.uid)
                                 WHERE usergroup NOT IN(".$ignore_groups.")
                                 GROUP BY s.uid 
                                 ORDER BY totalshouts 
                                 DESC LIMIT " . $mybb->settings['topshoutlimit']);
        }                
    }
    */
    
if( $gibek_pinek == TRUE )
    {    
        while(
$shout $db->fetch_array($query))
        {
                            
$shout['username'] = format_name($shout['username'], $shout['usergroup'], $shout['displaygroup']);
                            
$shout['profilelink'] = build_profile_link($shout['username'], $shout['uid']);
                            
$shout['shouts'] = $shout['totalshouts']; 
                            
$avatar format_avatar($shout['avatar']);                            
                            
$color $mybb->settings['topshoutcolor'];
                            
                eval(
'$topshout_row .= "'.$templates->get("topshout_row").'";');
        }
    }
    if(
$mybb->settings['topshoutcoll'] == '1')
    {
        
// to i tak nie zadziała, więc przerób sobie pod 1.8, albo wyłącz możliwość zwijania w tym pluginie
        
$collapse '<div class="expcolimage"><img src="images/collapse.png" id="shouters_img" class="expander" alt="{$expaltext}" title="{$expaltext}" /></div>';
    }
    
eval(
'$topshout = "'.$templates->get('topshout').'";');
}
?>
Last Visitors:
<?php
//*************************************//
//*************************************//
//*********** Last Visitors ************//
//*************************************//
//*************************************//


// Disallow direct access to this file for security reasons
if(!defined("IN_MYBB"))
{
    die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}

$plugins->add_hook("member_profile_end", "lastvisitors_profile");



function lastvisitors_info()
{
    return array('name'          => 'Last Visitors in Profile',
                 'description'   => 'Add a Box in Users Profiles with Last 10 Users Have Visit It',
                 'website'       => '',
                 'author'        => 'LLNN',
                 'authorsite'    => '',
                 'version'       => '1.1',
                 'compatibility' => '1*',
                 'guid'           => '9e2233dc1d258ae05ecba084c4b0dda6'
                );
}

function lastvisitors_activate()
{

    global $mybb, $db, $templates;

    require MYBB_ROOT.'/inc/adminfunctions_templates.php';

    $sql ="CREATE TABLE `".TABLE_PREFIX."lastvisitor` (
    `uid` VARCHAR( 10 ) NOT NULL ,
    `vid` VARCHAR( 10 ) NOT NULL ,
    `time` VARCHAR( 50 ) NOT NULL
    ) ENGINE = MYISAM ;";

    $db->write_query($sql);

    $template1 = array("title"        => "userprofile_lastvisit",
            "template"    => "<br />
    <table border=\"0\" cellspacing=\"{\$theme\[\'borderwidth\'\]}\" cellpadding=\"{\$theme\[\'tablespace\'\]}\" class=\"tborder\" style=\"border: #393939 solid 1px;\">
    <tr>
    <td colspan=\"2\" style=\"width: 100%;\"class=\"tcat\"><strong>Ostatnio byli</strong></td>
    {\$lastvisitor}
    </tr>
    </tr>
    </table>","sid"        => -1);

    $db->insert_query("templates", $template1);

    find_replace_templatesets('member_profile', '#{\$modoptions}#', "{\$modoptions}
    {\$last_visit}");

}


function lastvisitors_deactivate()
{

global $mybb, $db, $templates;

$sql ="DROP TABLE `mybb_lastvisitor`;";

$db->write_query($sql);

require MYBB_ROOT.'/inc/adminfunctions_templates.php';

find_replace_templatesets('member_profile', '#\{\$last_visit\}#', '', 0);

$db->delete_query("templates","title IN('userprofile_lastvisit')");

}

function lastvisitors_profile(){

global $mybb, $db, $templates, $theme, $lastvisitor, $memprofile, $last_visit ;

$myuid = $memprofile['uid'];
$vuid = $mybb->user['uid'];

$query = $db->simple_select('lastvisitor', '*', "uid='".$myuid."' and vid='".$vuid."'");

$nr = $db->num_rows($query);

IF($vuid != "0" and $vuid != $myuid ){

$tt = time();

IF($nr<1){
$db->write_query("INSERT INTO `".TABLE_PREFIX."lastvisitor` VALUES ('$myuid', '$vuid','$tt')");
}else{
$db->update_query("lastvisitor", array('time' => $tt),  "uid='".$myuid."' and vid='".$vuid."'");
}

}

$query = $db->query('SELECT * FROM ' . TABLE_PREFIX . 'lastvisitor,' . TABLE_PREFIX . 'users WHERE ' . TABLE_PREFIX . 'users.uid=' . TABLE_PREFIX . 'lastvisitor.vid AND ' . TABLE_PREFIX . 'lastvisitor.uid='.$myuid.'  ORDER BY ' . TABLE_PREFIX . 'lastvisitor.time DESC LIMIT 10;');


while($row = $db->fetch_array($query)){

$u = $row['vid'];
$un = get_user($u);

if($un!=""){

$date = my_date($mybb->settings['dateformat'], $row['time']);
$time = my_date($mybb->settings['timeformat'], $row['time']);

$avatar = format_avatar($row['avatar']);

$username = format_name($row['username'], $row['usergroup'], $row['displaygroup']);
$username = build_profile_link($username, $row['uid']);

$lastvisitor = $lastvisitor."<tr><td class=\"trow1\"><img src='" . $avatar . "' alt='' title='' /></td><td class=\"trow1\">".$username." <br />".$date." - ".$time." </td></tr>";
}

}


eval("\$last_visit = \"".$templates->get("userprofile_lastvisit")."\";");

}

?>
Prośby na PW dotyczące wsparcia z problemami będą ignorowane. Pomoc poza forum - odpłatna; kontakt: snakemybboard@gmail.com.
Po podmianie kodu jest tak:

A: Last visitors:

http://scr.hu/4gy7/h1613

B: Top Shoutersów:
http://scr.hu/4gy7/vptw8
Przeinstaluj wtyczki.
Prośby na PW dotyczące wsparcia z problemami będą ignorowane. Pomoc poza forum - odpłatna; kontakt: snakemybboard@gmail.com.
Top Shoutersów:
http://scr.hu/4gy7/e033y


Last Visitors już zostawmy bo nadal to samo
Top Shouters:
<?php
if(!defined('IN_MYBB'))
{
    die(
'This file cannot be accessed directly.');
}

$plugins->add_hook("index_end""topshout_show");
$plugins->add_hook("portal_end""topshout_show"); 

function 
topshout_info()
{
    global 
$lang$mybb$db;
    
$lang->load("topshout");
    
    return array(
        
"name"        => $lang->name,
        
"description"        => $lang->desc,
        
"website"        => "http://www.mybboad.pl",
        
"author"        => "GiboneKPL & Supryk",
        
"authorsite"        => "http://www.rashownia.pl",
        
"version"        => "1.4.0",
        
"guid"             => "*",
        
"compatibility"    => "18*"
        
);
}


function 
topshout_install()
{
    global 
$mybb$db$lang;
    
$lang->load("topshout");
    
    
$settinggroups = array(
        
'name'             => 'topshout'
        
'title'                 => $db->escape_string($lang->name),
        
'description'     => $db->escape_string($lang->settings_desc),
        
'disporder'         => 100
        
'isdefault'         => 0
    
);
    
$gid $db->insert_query("settinggroups"$settinggroups);
    
$disporder 0;

    
$setting = array(
        
"sid"                    => NULL,
        
"name"            => "topshoutlimit",
        
"title"                => $db->escape_string($lang->settings_limit),
        
"description"    => $db->escape_string($lang->settings_limit_desc),
        
"optionscode"    => "text",
        
"value"                => '5',
        
"disporder"        => $disporder++,
        
"gid"                    => $gid
    
);
    
$db->insert_query("settings"$setting);
    
    
$setting = array(
        
"sid"                    => NULL,
        
"name"            => "topshoutshoutbox",
        
"title"                => $db->escape_string($lang->settings_shoutbox),
        
"description"    => $db->escape_string($lang->settings_shoutbox_desc),
        
"optionscode"    => "select
dvzshoutbox=DVZ Shoutbox
myshoutbox=MyShoutbox
sfshoutbox=SpiceFuse Shoutbox"
,
        
"value"                => 'dvzshoutbox',
        
"disporder"        => $disporder++,
        
"gid"                    => $gid
    
);
    
$db->insert_query("settings"$setting);
    
    
$setting = array(
            
'sid' => 'NULL',
            
'name' => 'topshoutignore',
            
'title' => $db->escape_string($lang->settings_ignore_groups),
            
'description' =>  $db->escape_string($lang->settings_ignore_groups_desc),
            
'optionscode' => 'text',
            
'value' => '5,7',
            
'disporder' => $disporder++,
            
'gid' => $gid
    
);
    
$db->insert_query('settings'$setting);
    
    
$setting = array(
        
"sid"                    => NULL,
        
"name"            => "topshoutcolor",
        
"title"                => $db->escape_string($lang->settings_color),
        
"description"    => $db->escape_string($lang->settings_color_desc),
        
"optionscode"    => "text",
        
"value"                => '#7ba60d',
        
"disporder"        => $disporder++,
        
"gid"                    => $gid
    
);
    
$db->insert_query("settings"$setting);
    
    
$setting = array(
        
"sid"                    => NULL,
        
"name"            => "topshoutcoll",
        
"title"                => $db->escape_string($lang->settings_collapse),
        
"description"    => $db->escape_string($lang->settings_collapse_desc),
        
"optionscode"    => "yesno",
        
"value"                => '1',
        
"disporder"        => $disporder++,
        
"gid"                    => $gid
    
);
    
$db->insert_query("settings"$setting);
    
    
rebuild_settings(); 

    
$template = array(
        
"tid"             => "NULL",
        
"title"         => "topshout",
        
"template"        => $db->escape_string('<style type="text/css">
.top_shout {
display: inline-block;
height: 16px;
line-height: 16px;
padding: 0 5px;
font-size: 9px;
font-weight: bold;
text-transform: uppercase;
color: #fff;
text-shadow: rgba(0,0,0,0.2) 0px -1px 0px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
background-image: url(images/highlight.png);
background-repeat: repeat-x;
background-position: 0 -1px;
}
</style>
                                               
<table border="0" cellspacing="{$theme[borderwidth]}" cellpadding="{$theme[tablespace]}" class="tborder" style="clear: both; border-bottom-width: 0;">
<tr>
<td class="thead" colspan="2">
{$collapse}
<strong>{$lang->name}</strong>
</td>
</tr>
<tbody style="{$expdisplay}" id="shouters_e">
{$topshout_row}
</tbody>
</table>
<br />'
),
        
"sid"             => "-1"
        );
        
$db->insert_query("templates"$template);
        
    
$template = array(
        
"tid"             => "NULL",
        
"title"         => "topshout_row",
        
"template"        => $db->escape_string('<tr><td class="trow2">
<img src="{$avatar[\'image\']}" alt="" title="" style="float: left; margin-right: 5px;" />
{$shout[\'profilelink\']}
<span style="float: right;margin-right: 5px;margin-top: 7px;background: {$color}" class="top_shout">{$shout[\'shouts\']}</span>
</td></tr'
),
        
"sid"             => "-1"
        );
        
$db->insert_query("templates"$template);
}


function 
topshout_is_installed()
{
    global 
$db$lang$mybb;
    
$lang->load("topshout");
    
    
$q $db->simple_select('settinggroups''*''name=\'topshout\'');
    
$group $db->fetch_array($q);
    if(
$group === null || empty($group))
    return 
false;
    return 
true;
}

function 
topshout_uninstall()
{
    global 
$mybb$db$lang;
    
$lang->load("topshout");
    
    
$db->delete_query("settinggroups""name = 'topshout'");
    
$db->delete_query('settings''name LIKE \'%topshout%\'');
    
$db->delete_query('templates''title LIKE (\'%topshout%\')');


function 
topshout_show()
{
    global 
$db$mybb$page$topshout$theme$templates$shout$topshout_row$lang;
    
$lang->load("topshout");
        
    
$gibek_pinek FALSE;
    
    
$ignore_groups $mybb->settings['topshoutignore'];
    if(
$ignore_groups == '')
    {
            
$ignore_groups '9999999';
    }
        
    if(
$mybb->settings['topshoutshoutbox'] == 'dvzshoutbox')
    {
        if (!
$db->table_exists("dvz_shoutbox"))        
        {
            
$topshout_row '<tr><td class="trow2">'.$lang->install_dvz.'</td></tr>';
        }
        else
        {
            
$gibek_pinek TRUE;
            
$query $db->query("SELECT s.uid, u.username, u.usergroup, u.displaygroup, u.uid, u.avatar, count(*) as totalshouts 
                                 FROM "
.TABLE_PREFIX."dvz_shoutbox s
                                    LEFT JOIN "
.TABLE_PREFIX."users u ON (u.uid=s.uid)
                                 WHERE usergroup NOT IN("
.$ignore_groups.")
                                 GROUP BY s.uid 
                                 ORDER BY totalshouts 
                                 DESC LIMIT " 
$mybb->settings['topshoutlimit']);
        }
                             
    }
   
/* elseif($mybb->settings['topshoutshoutbox'] == 'myshoutbox')
    {    
        if (!$db->table_exists("mysb_shouts"))        
        {
            $topshout_row = '<tr><td class="trow2">'.$lang->install_mysb.'</td></tr>';
        }
        else
        {
            $gibek_pinek = TRUE;
            $query = $db->query("SELECT s.uid, u.username, u.usergroup, u.displaygroup, u.uid, u.avatar, count(*) as totalshouts 
                                 FROM ".TABLE_PREFIX."mysb_shouts s
                                 LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=s.uid)
                                 WHERE usergroup NOT IN(".$ignore_groups.")
                                 GROUP BY s.uid 
                                 ORDER BY totalshouts 
                                 DESC LIMIT " . $mybb->settings['topshoutlimit']);
        }                             
    }
    elseif($mybb->settings['topshoutshoutbox'] == 'sfshoutbox')
    {
        if (!$db->table_exists("sf_shouts"))        
        {
            $topshout_row = '<tr><td class="trow2">'.$lang->install_sfsb.'</td></tr>';
        }
        else
        {
            $gibek_pinek = TRUE;
            $query = $db->query("SELECT s.uid, u.username, u.usergroup, u.displaygroup, u.uid, u.avatar, count(*) as totalshouts 
                                 FROM ".TABLE_PREFIX."sf_shouts s
                                 LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=s.uid)
                                 WHERE usergroup NOT IN(".$ignore_groups.")
                                 GROUP BY s.uid 
                                 ORDER BY totalshouts 
                                 DESC LIMIT " . $mybb->settings['topshoutlimit']);
        }                
    }
    */
    
if( $gibek_pinek == TRUE )
    {    
        while(
$shout $db->fetch_array($query))
        {
                            
$shout['username'] = format_name($shout['username'], $shout['usergroup'], $shout['displaygroup']);
                            
$shout['profilelink'] = build_profile_link($shout['username'], $shout['uid']);
                            
$shout['shouts'] = $shout['totalshouts']; 
                            
$avatar format_avatar($shout['avatar'], "32x32""32x32");                            
                            
$color $mybb->settings['topshoutcolor'];
                            
                eval(
'$topshout_row .= "'.$templates->get("topshout_row").'";');
        }
    }
    if(
$mybb->settings['topshoutcoll'] == '1')
    {
        
// to i tak nie zadziała, więc przerób sobie pod 1.8, albo wyłącz możliwość zwijania w tym pluginie
        
$collapse '<div class="expcolimage"><img src="images/collapse.png" id="shouters_img" class="expander" alt="{$expaltext}" title="{$expaltext}" /></div>';
    }
    
eval(
'$topshout = "'.$templates->get('topshout').'";');
}
?>
Last Visitors
<?php
//*************************************//
//*************************************//
//*********** Last Visitors ************//
//*************************************//
//*************************************//


// Disallow direct access to this file for security reasons
if(!defined("IN_MYBB"))
{
    die(
"Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}

$plugins->add_hook("member_profile_end""lastvisitors_profile");



function 
lastvisitors_info()
{
    return array(
'name'          => 'Last Visitors in Profile',
                 
'description'   => 'Add a Box in Users Profiles with Last 10 Users Have Visit It',
                 
'website'       => '',
                 
'author'        => 'LLNN',
                 
'authorsite'    => '',
                 
'version'       => '1.1',
                 
'compatibility' => '1*',
                 
'guid'           => '9e2233dc1d258ae05ecba084c4b0dda6'
                
);
}

function 
lastvisitors_activate()
{

    global 
$mybb$db$templates;

    require 
MYBB_ROOT.'/inc/adminfunctions_templates.php';

    
$sql ="CREATE TABLE `".TABLE_PREFIX."lastvisitor` (
    `uid` VARCHAR( 10 ) NOT NULL ,
    `vid` VARCHAR( 10 ) NOT NULL ,
    `time` VARCHAR( 50 ) NOT NULL
    ) ENGINE = MYISAM ;"
;

    
$db->write_query($sql);

    
$template1 = array("title"        => "userprofile_lastvisit",
            
"template"    => "<br />
    <table border=\"0\" cellspacing=\"{\$theme\[\'borderwidth\'\]}\" cellpadding=\"{\$theme\[\'tablespace\'\]}\" class=\"tborder\" style=\"border: #393939 solid 1px;\">
    <tr>
    <td colspan=\"2\" style=\"width: 100%;\"class=\"tcat\"><strong>Ostatnio byli</strong></td>
    {\$lastvisitor}
    </tr>
    </tr>
    </table>"
,"sid"        => -1);

    
$db->insert_query("templates"$template1);

    
find_replace_templatesets('member_profile''#{\$modoptions}#'"{\$modoptions}
    {\$last_visit}"
);

}


function 
lastvisitors_deactivate()
{

global 
$mybb$db$templates;

$sql ="DROP TABLE `mybb_lastvisitor`;";

$db->write_query($sql);

require 
MYBB_ROOT.'/inc/adminfunctions_templates.php';

find_replace_templatesets('member_profile''#\{\$last_visit\}#'''0);

$db->delete_query("templates","title IN('userprofile_lastvisit')");

}

function 
lastvisitors_profile(){

global 
$mybb$db$templates$theme$lastvisitor$memprofile$last_visit ;

$myuid $memprofile['uid'];
$vuid $mybb->user['uid'];

$query $db->simple_select('lastvisitor''*'"uid='".$myuid."' and vid='".$vuid."'");

$nr $db->num_rows($query);

IF(
$vuid != "0" and $vuid != $myuid ){

$tt time();

IF(
$nr<1){
$db->write_query("INSERT INTO `".TABLE_PREFIX."lastvisitor` VALUES ('$myuid', '$vuid','$tt')");
}else{
$db->update_query("lastvisitor", array('time' => $tt),  "uid='".$myuid."' and vid='".$vuid."'");
}

}

$query $db->query('SELECT * FROM ' TABLE_PREFIX 'lastvisitor,' TABLE_PREFIX 'users WHERE ' TABLE_PREFIX 'users.uid=' TABLE_PREFIX 'lastvisitor.vid AND ' TABLE_PREFIX 'lastvisitor.uid='.$myuid.'  ORDER BY ' TABLE_PREFIX 'lastvisitor.time DESC LIMIT 10;');


while(
$row $db->fetch_array($query)){

$u $row['vid'];
$un get_user($u);

if(
$un!=""){

$date my_date($mybb->settings['dateformat'], $row['time']);
$time my_date($mybb->settings['timeformat'], $row['time']);

$avatar format_avatar($row['avatar'], "35x35""35x35");

$username format_name($row['username'], $row['usergroup'], $row['displaygroup']);
$username build_profile_link($username$row['uid']);

$lastvisitor $lastvisitor."<tr><td class=\"trow1\"><img src='" $avatar['image'] . "' alt='' title='' style='float: left; margin-right: 5px;' /></td><td class=\"trow1\">".$username." <br />".$date." - ".$time." </td></tr>";
}

}


eval(
"\$last_visit = \"".$templates->get("userprofile_lastvisit")."\";"); 

}

?>
Prośby na PW dotyczące wsparcia z problemami będą ignorowane. Pomoc poza forum - odpłatna; kontakt: snakemybboard@gmail.com.
Top Shouters, avatary są 130x130 a ja chce żeby były 30x30 od samego początku :D
Przeinstalowałeś plugin? Dziwne.
Jeśli tak, to:
<img src="{$avatar[\'image\']}" alt="" title="" style="float: left; margin-right: 5px;" /> 
zamień na:
<img src="{$avatar[\'image\']}" alt="" title="" style="float: left; margin-right: 5px; width: 30px; height: 30px;" /> 
albo po prostu dokonaj tych zmian w szablonie...
Prośby na PW dotyczące wsparcia z problemami będą ignorowane. Pomoc poza forum - odpłatna; kontakt: snakemybboard@gmail.com.



Użytkownicy przeglądający ten wątek:

2 gości