vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   vBulletin CMS Widgets - Widget - Users Online (https://vborg.vbsupport.ru/showthread.php?t=230428)

OldSchoolDSL 03-21-2011 11:56 PM

un-installed

Trying to better optimize my community.

Anyone know how to delete a template? vbcms_widget_execphp_activeusers

Lynne 03-22-2011 12:04 AM

Quote:

Originally Posted by OldSchoolDSL (Post 2175999)
Anyone know how to delete a template? vbcms_widget_execphp_activeusers

Click revert in the style you created the template.

OldSchoolDSL 03-22-2011 12:11 AM

Quote:

Originally Posted by Lynne (Post 2176000)
Click revert in the style you created the template.

Thank you very much. I never knew that would also remove a template within a style.

CLSSY56 03-23-2011 02:16 PM

I have this error, any ideas?

Parse error: syntax error, unexpected $end in /home/horizon/public_html/forums/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 150

Lynne 03-23-2011 03:46 PM

Quote:

Originally Posted by CLSSY56 (Post 2176553)
I have this error, any ideas?

Parse error: syntax error, unexpected $end in /home/horizon/public_html/forums/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 150

Unexpected $end means you haven't uploaded a file completely/correctly.

CLSSY56 03-23-2011 03:53 PM

I wonder what that could be... It was working before. I thought I would try my hand in adding a revolver map to show on that widget as well. When I did that it gave me the error, so I deleted that code. The error was still there so I copy and pasted your code back in there and the error is still there.

Lynne 03-23-2011 04:30 PM

Some code has unexpectantly ended. So, maybe you forgot a } somewhere.

CLSSY56 03-23-2011 05:07 PM

I have no clue... I know nothing about php.

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); 


Lynne 03-23-2011 05:13 PM

I don't need to see the php code as it is in the first post in this thread. I will tell you that you are missing a } in it though. You did not copy it correctly.

CLSSY56 03-23-2011 05:17 PM

Yep your right, } was not at the very end. Thanks!

YkudzA 03-24-2011 12:22 PM

thx a lot ! installed !

Popa Andrei 04-07-2011 08:25 AM

i have an conflict when vboptimize is active.

Fatal error: Call to a member function query_read_slave() on a non-object in /home/storm/public_html/forum/vboptimise/cachers/cacher_forumhomewol.php on line 35


EDIT: i solved the problem.Delleted the plugin that was managing the chace for the widget so now the cache is handled by the vboptimize.
Proof: www.stormzone.ro

YkudzA 04-07-2011 10:00 AM

still error on your page

Charlie98902 04-07-2011 03:32 PM

I was shocked after upgrading from 4.1.2 to 4.1.3 I expected to have to re-enter this information but didn't. I was happy as it was one less thing I had to deal with.

Gleedo 04-09-2011 01:05 PM

Quote:

Originally Posted by Lynne (Post 1932585)
Since users online are already on the Forum Home page, I'm not sure why you would want to redo the query to get all the names again and put it on the same page. But, I really don't know if it would work there since I haven't tried it.

The users that display in the 'currently active users' section in the bottom of the forum homepage no longer works after upgrading to 4.1.3. Have posted on vb forums but had no response. Have installed this in time being on homepage but it's nice to have on forum too.

Thanks for the mod.

Charlie98902 04-09-2011 02:17 PM

Coding has to be wrong somewhere as it isn't doing this on my end. If you are using a spider display mod disable that as I had this issue and had to tweak mine so I can use this mod.

Igel1 06-09-2011 05:47 PM

Hi Lynne,

first your widget has always worked with all VB updates for me.

But now I have a little problem,
I have updated from VB 4.1.1 to 4.1.3PL1-
The widget will still appear but the names of online users are not wrapped they are given one or two rows behind each other and run out of the widget.

This occurs only in IE8 but when I turn on compatibility view in IE8, the user name again displayed correctly.
The same problem I have also in block users online.

Perhaps you have an idea on what to do?

Excuse my English, is translated with Google.

Igel1

Lynne 06-10-2011 02:06 AM

Quote:

Originally Posted by Igel1 (Post 2205536)
Hi Lynne,

first your widget has always worked with all VB updates for me.

But now I have a little problem,
I have updated from VB 4.1.1 to 4.1.3PL1-
The widget will still appear but the names of online users are not wrapped they are given one or two rows behind each other and run out of the widget.

This occurs only in IE8 but when I turn on compatibility view in IE8, the user name again displayed correctly.
The same problem I have also in block users online.

Perhaps you have an idea on what to do?

Excuse my English, is translated with Google.

Igel1

Unfortunately, I do not have IE and so I have no way to troubleshoot this. I do know that this sounds like a problem that was going on with the Currently Active Users list on the bottom of the forum home page and that was, I believe, a CSS issue. I can't remember if it is fixed now or not, but if it is, try comparing the CSS for the names on there to the CSS for the names in the widget.

doctorsexy 06-10-2011 02:52 PM

Thanks..working with 4.1.3

Anopheles 06-14-2011 08:25 PM

Workin with vBulletin 4.1.4 :up:

raulin 06-14-2011 09:26 PM

<u>thanks</u>, I install

doctorsexy 08-22-2011 10:34 AM

Installed again on 4.1.5 working smashin... thanks

markis13446 09-03-2011 02:01 PM

can this be modded to not show who is online?

Lynne 09-03-2011 02:50 PM

Quote:

Originally Posted by markis13446 (Post 2241531)
can this be modded to not show who is online?

You may mod it however you want. Just take out any code you don't want/need and remove anything you don't want/need from the template.

markis13446 09-03-2011 11:57 PM

Thanks Lynne,

Let me rephrase, can you help with with scaling back the code? I don't have any php skills.

Thanks

Lynne 09-04-2011 03:46 PM

Quote:

Originally Posted by markis13446 (Post 2241689)
Thanks Lynne,

Let me rephrase, can you help with with scaling back the code? I don't have any php skills.

Thanks

What exactly do you want the widget to look like instead? (It is a Users Online widget, so I'm not really picturing what you want if you don't want the online users to show.)

goxy63 10-07-2011 01:32 AM

Hi
Just noticed one small "problem" after upgraded to VB4.1.7

My forum default language is not English, but English is an option on forums, and when someone chooses English as his default language I got this problem (pls check attached picture)

http://img403.imageshack.us/img403/269/widgetprob.gif

Marked area is not click able as it is when I choose my default language, its just grey not blue as before, giving right info tho

Any ideas?

Lynne 10-07-2011 01:42 AM

Perhaps that phrase is different in your language versus what the phrase is like in English. It is the phrase itself that makes the link. So, if the link is missing, that is a problem with your phrase.

urulela 10-07-2011 06:19 AM

with the update to 4.1.7 eliminated "vb: rawphrase there_are_x_online,"?

Lynne 10-07-2011 07:38 PM

Yep, it does look like that happened. So, replace:
HTML Code:

{vb:rawphrase there_are_x_online, {vb:raw totalonline}}
with:
HTML Code:

{vb:rawphrase there_are_x_y_online_link, {vb:raw totalonline}, {vb:raw session.sessionurl_q}}

vanquish.securi 10-07-2011 11:19 PM

Works great on vB 4.1.7. Easy to follow. Marked.

urulela 10-09-2011 02:31 PM

Quote:

Originally Posted by Lynne (Post 2254449)
Yep, it does look like that happened. So, replace:
HTML Code:

{vb:rawphrase there_are_x_online, {vb:raw totalonline}}
with:
HTML Code:

{vb:rawphrase there_are_x_y_online_link, {vb:raw totalonline}, {vb:raw session.sessionurl_q}}

Thank you :up:

GPOClan 10-14-2011 10:29 AM

Great work, dude!
But I have a small problem: The widget disappears, when I refresh the page! What's wrong here?

Weetabix 10-19-2011 10:49 AM

I don't think this has been asked in this thread (sorry if it has), is there a way to include birthdays and newest members in this widget?

OlijO 10-20-2011 05:05 AM

Quote:

Originally Posted by GPOClan (Post 2257106)
Great work, dude!
But I have a small problem: The widget disappears, when I refresh the page! What's wrong here?

I have the same problem. (vB4.1.7 fresh install).

goxy63 10-20-2011 10:34 AM

Quote:

Originally Posted by Weetabix (Post 2258921)
I don't think this has been asked in this thread (sorry if it has), is there a way to include birthdays and newest members in this widget?

You already got those widgets, I found them here on vb.org just search forums.
You cant get everything in one widget, I would not like such a widget;)

Micha66 10-21-2011 04:10 PM

hi, is there a possibility to show how many users (also unregistered) where online today?

Lynne 10-21-2011 05:19 PM

If you add in the code to do so, sure. Feel free to modify this however you want.

Micha66 10-21-2011 09:20 PM

ok but i dont know how to do that

AcesGaming 10-23-2011 11:06 PM

EDIT: My bad, I had done it to the original style. I got it to work.

Thank you very much for making this.


All times are GMT. The time now is 03:21 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01958 seconds
  • Memory Usage 1,903KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_html_printable
  • (1)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete