форум vBSupport.ru > vBulletin > vBulletin 4.0.x-4.1.х > Хаки, моды и скрипты 4.0.x-4.1.х
Register Меню vBsupport Изображения Files Manager О рекламе Today's Posts Search
  • Родная гавань
  • Блок РКН снят
  • Premoderation
  • For English speaking users
  • Каталог Фрилансеров
  • If you want to buy some product or script
  • Администраторам
VBsupport перешел с домена .ORG на родной .RU Ура! Пожалуйста, обновите свои закладки - VBsupport.ru
Блок РКН снят, форум доступен на всей территории России, включая новые терртории, без VPN
На форуме введена премодерация ВСЕХ новых пользователей

Почта с временных сервисов, типа mailinator.com, gawab.com и/или прочих, которые предоставляют временный почтовый ящик без регистрации и/или почтовый ящик для рассылки спама, отслеживается и блокируется, а так же заносится в спам-блок форума, аккаунты удаляются
for English speaking users:
You may be surprised with restriction of access to the attachments of the forum. The reason is the recent change in vbsupport.org strategy:

- users with reputation < 10 belong to "simple_users" users' group
- if your reputation > 10 then administrator (kerk, Luvilla) can decide to move you into an "improved" group, but only manually

Main idea is to increase motivation of community members to share their ideas and willingness to support to each other. You may write an article for the subject where you are good enough, you may answer questions, you may share vbulletin.com/org content with vbsupport.org users, receiving "thanks" equal your reputation points. We should not only consume, we should produce something.

- you may:
* increase your reputation (doing something useful for another members of community) and being improved
* purchase temporary access to the improved category:
10 $ for 3 months. - this group can download attachments, reputation/posts do not matter.
20 $ for 3 months. - this group can download attachments, reputation/posts do not matter + adds eliminated + Inbox capacity increased + files manager increased permissions.

Please contact kerk or Luvilla regarding payments.

Important!:
- if your reputation will become less then 0, you will be moved into "simple_users" users' group automatically.*
*for temporary groups (pre-paid for 3 months) reputation/posts do not matter.
Уважаемые пользователи!

На форуме открыт новый раздел "Каталог фрилансеров"

и отдельный раздел для платных заказов "Куплю/Закажу"

Если вы хотите приобрести какой то скрипт/продукт/хак из каталогов перечисленных ниже:
Каталог модулей/хаков
Ещё раз обращаем Ваше внимание: всё, что Вы скачиваете и устанавливаете на свой форум, Вы устанавливаете исключительно на свой страх и риск.
Сообщество vBSupport'а физически не в состоянии проверять все стили, хаки и нули, выкладываемые пользователями.
Помните: безопасность Вашего проекта - Ваша забота.
Убедительная просьба: при обнаружении уязвимостей или сомнительных кодов обязательно отписывайтесь в теме хака/стиля
Спасибо за понимание
 
 
 
 
Maximal
Простоузер
Post Виджет - Кто на сайте
2

INSTALL INSTRUCTIONS:

1) Create a new Template
Styles & Templates > select style (I like to do this in the MASTER STYLE, but you will need to reinput it after every upgrade) > Add Template
Title - vbcms_widget_execphp_activeusers
Template code -
HTML Code:
<vb:if condition="$show['loggedinusers']">
<div class="cms_widget category_widget">
    <div class="block">
        <div class="cms_widget_header">
            <h3><img src="{vb:stylevar imgdir_misc}/users_online.png" alt="{vb:rawphrase currently_active_users}" />{vb:rawphrase currently_active_users}</h3>
        </div>
        <div class="cms_widget_content widget_content">
            <div>
                <p>{vb:rawphrase there_are_x_online, {vb:raw totalonline}} <span class="shade">{vb:rawphrase x_members_and_y_guests, {vb:raw numberregistered}, {vb:raw numberguest}}</span></p>
                <p>{vb:rawphrase most_users_ever_online_was_x_y_at_z, {vb:raw recordusers}, {vb:raw recorddate}, {vb:raw recordtime}}</p>
                <ol class="commalist" id="wgo_onlineusers_list">
                    {vb:raw activeusers}
                </ol>
            </div>
        </div>
    </div>
</div>
</vb:if>
.
2) Create a new Plugin
Plugins & Products > Add New Plugin > leave everything default except:
Hook Location - cache_templates
Title - Cache template for Users Online Widget
Plugin PHP code -
PHP Code:
if (THIS_SCRIPT == 'vbcms')
{
    
$cache[] = 'forumhome_loggedinuser';

Plugin is Active - Yes

3) Create a new Widget
vBulletin CMS > Widgets > Create New Widget
Widget Type - PHP Direct Execution
Title - Users Online
SAVE

4) Configure the Widget
Now go to vBulletin CMS > Widgets > Users Online > Configure
Change the Template Name to -
vbcms_widget_execphp_activeusers
Add the following code -
PHP Code:
require_once(DIR '/includes/functions_bigthree.php'); 

$activeusers '';
if ((
vB::$vbulletin->options['displayloggedin'] == OR vB::$vbulletin->options['displayloggedin'] == OR (vB::$vbulletin->options['displayloggedin'] > AND vB::$vbulletin->userinfo['userid'])) AND !$show['search_engine'])
{
    
$datecut TIMENOW vB::$vbulletin->options['cookietimeout'];
    
$numbervisible 0;
    
$numberregistered 0;
    
$numberguest 0;
    
    
$hook_query_fields $hook_query_joins $hook_query_where '';
    (
$hook vBulletinHook::fetch_hook('forumhome_loggedinuser_query')) ? eval($hook) : false;

    
$forumusers vB::$db->query_read_slave("
        SELECT
            user.username, (user.options & " 
vB::$vbulletin->bf_misc_useroptions['invisible'] . ") AS invisible, user.usergroupid, user.lastvisit,
            session.userid, session.inforum, session.lastactivity, session.badlocation,
            IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid, infractiongroupid
            
$hook_query_fields
        FROM " 
TABLE_PREFIX "session AS session
        LEFT JOIN " 
TABLE_PREFIX "user AS user ON(user.userid = session.userid)
        
$hook_query_joins
        WHERE session.lastactivity > 
$datecut
            
$hook_query_where
        " 
iif(vB::$vbulletin->options['displayloggedin'] == OR vB::$vbulletin->options['displayloggedin'] == 3"ORDER BY username ASC") . "
    "
);

    if (
vB::$vbulletin->userinfo['userid'])
    {
        
// fakes the user being online for an initial page view of index.php
        
vB::$vbulletin->userinfo['joingroupid'] = iif(vB::$vbulletin->userinfo['displaygroupid'], vB::$vbulletin->userinfo['displaygroupid'], vB::$vbulletin->userinfo['usergroupid']);
        
$userinfos = array
        (
            
vB::$vbulletin->userinfo['userid'] => array
            (
                
'userid'            =>& vB::$vbulletin->userinfo['userid'],
                
'username'          =>& vB::$vbulletin->userinfo['username'],
                
'invisible'         =>& vB::$vbulletin->userinfo['invisible'],
                
'inforum'           => 0,
                
'lastactivity'      => TIMENOW,
                
'lastvisit'         =>& vB::$vbulletin->userinfo['lastvisit'],
                
'usergroupid'       =>& vB::$vbulletin->userinfo['usergroupid'],
                
'displaygroupid'    =>& vB::$vbulletin->userinfo['displaygroupid'],
                
'infractiongroupid' =>& vB::$vbulletin->userinfo['infractiongroupid'],
            )
        );
    }
    else
    {
        
$userinfos = array();
    }
    
$inforum = array();

    while (
$loggedin vB::$db->fetch_array($forumusers))
    {
        
$userid $loggedin['userid'];
        if (!
$userid)
        {    
// Guest
            
$numberguest++;
            if (!isset(
$inforum["$loggedin[inforum]"]))
            {
                
$inforum["$loggedin[inforum]"] = 0;
            }
            if (!
$loggedin['badlocation'])
            {
                
$inforum["$loggedin[inforum]"]++;
            }
        }
        else if (empty(
$userinfos["$userid"]) OR ($userinfos["$userid"]['lastactivity'] < $loggedin['lastactivity']))
        {
            
$userinfos["$userid"] = $loggedin;
        }
    }

    if (!
vB::$vbulletin->userinfo['userid'] AND $numberguest == 0)
    {
        
$numberguest++;
    }

    
$skipgroups = array(3,4);
    foreach (
$userinfos AS $userid => $loggedin)
    {
        if (
in_array($loggedin['usergroupid'], $skipgroups))
        {
            
$numberguest++;
        }
        else
        {
            
$numberregistered++;
            if (
$userid != vB::$vbulletin->userinfo['userid'] AND !$loggedin['badlocation'])
            {
                if (!isset(
$inforum["$loggedin[inforum]"]))
                {
                    
$inforum["$loggedin[inforum]"] = 0;
                }
                
$inforum["$loggedin[inforum]"]++;
            }
            
fetch_musername($loggedin);

            (
$hook vBulletinHook::fetch_hook('forumhome_loggedinuser')) ? eval($hook) : false;

            if (
fetch_online_status($loggedin))
            {
                
$numbervisible++;
                
$show['comma_leader'] = ($activeusers != '');
                
$templater vB_Template::create('forumhome_loggedinuser');
                
$templater->register('loggedin'$loggedin);
                
$activeusers .= $templater->render();
                
vB_Template::preRegister('vbcms_widget_execphp_activeusers', array('activeusers' => $activeusers)); 
            }
        }
    }

    
// memory saving
    
unset($userinfos$loggedin);

    
vB::$db->free_result($forumusers);

    
$totalonline $numberregistered $numberguest;
    
$numberinvisible $numberregistered $numbervisible;
     
    
vB::$vbulletin->datastore->fetch(array('maxloggedin'));
    if (
vB::$vbulletin->maxloggedin === NULL)
    {
        
vB::$vbulletin->maxloggedin = array();
    }
    if (
intval(vB::$vbulletin->maxloggedin['maxonline']) <= $totalonline)
    {
        
vB::$vbulletin->maxloggedin['maxonline'] = $totalonline;
        
vB::$vbulletin->maxloggedin['maxonlinedate'] = TIMENOW;
        
build_datastore('maxloggedin'serialize(vB::$vbulletin->maxloggedin), 1);
    }

    
$recordusers vb_number_format(vB::$vbulletin->maxloggedin['maxonline']);
    
$recorddate vbdate(vB::$vbulletin->options['dateformat'], vB::$vbulletin->maxloggedin['maxonlinedate'], true);
    
$recordtime vbdate(vB::$vbulletin->options['timeformat'], vB::$vbulletin->maxloggedin['maxonlinedate']);

    
$show['loggedinusers'] = true;
    
    
$statsarray = array('onlinestats' => $onlinestats,
    
'totalonline' => $totalonline,
    
'numberregistered' => $numberregistered,
    
'numberguest' => $numberguest,
    
'show'    => $show,
    
'recordusers'  => $recordusers,
    
'recorddate'  => $recorddate,
    
'recordtime'  => $recordtime,
    );
    
    
vB_Template::preRegister('vbcms_widget_execphp_activeusers'$statsarray); 

Attached Files
File Type: txt widget-users online 1.2.txt (7.7 KB, 21 views)
Bot
Yandex Bot Yandex Bot is online now
 
Join Date: 05.05.2005
Реклама на форуме А что у нас тут интересного? =)
 
 
LowDog
Простоузер
Default
0

скриншот бы исчо
 
 
Arefiev
Простоузер
Default
0

Quote:
Originally Posted by LowDog View Post
скриншот бы исчо
все предельно просто
можно использовать переводчик http://translate.google.ru/translate...7%23post347977 только код брать из этого топика
 
 
Волк
Эксперт
 
Волк's Avatar
Default
0

Оффтоп
 
 
LowDog
Простоузер
Default
0

Ставил кто?Скриншот бы таки позырить =)
 


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




All times are GMT +4. The time now is 01:04 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.