Help Needed Who's online block

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Help Needed Who's online block
fr34k
CZ Super Newbie
fr34k has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Oct 29, 2004
0.00 posts per day
Posts: 36
Points: 464
   
Hi guys - wondered if someone could help me out.

Over the past two weeks i have noticed that the guests online within our subsilver forum index is always displaying the total as 0.

When i access the forum acp it is showing that there are 30-50+ people within the forum along with the boards they are viewing.

The funny thing is the Who's online block (at the bottom of the forum index) is able to display the members online along with their usernames. Any idea's why it is choosing not to displays guest/visitors.

Not being a coder i havent got a clue what i should be looking for or where i should go to even begin to try and solve this problem.

Someone advised me that it could be in relation to timers/sessions - although i don't believe this is true due to the fact that no matter what time day or night i view our forums the guest amount is always displayed as 0, even when the forum acp clearly shows that guests are online.

any help would be greatly apreciated as our forums are getting quite busy and to those accessing our forums for the first time are thinking our forum is a ghost town (plus we are currently running a competition - and to sponsors who have donated prizes for it may think our competition is not as popular as what we are telling them - which in turn means future competitions will not have their participation).

Thanks in advance
Darren



Back to top Reply with quote
#2   re: Help Needed Who's online block
DAMIAN
CZ Active Member
 Codezwiz Site Donator
DAMIAN has been a member for over 20 year's 20 Year Member
usa.gif mississippi.gif
Occupation: Net Junkie
Age: 58
Gender: Male
Fav. Sports Team: steelers
Website:
Status: Offline
Joined: Aug 08, 2004
0.02 posts per day
Posts: 177
Points: 9,848
   
what version of nuke and what version of phpbb are you running?
a lot of times with intergrated forums, its only going to show members online and not visitors, you might come out better with a main page block showing members and visitors and their location, like the who-is-where block.




_________________
[ Register or login to view links on this board.]
[ Register or login to view links on this board.]
[ Register or login to view links on this board.]

It is better to regret something that you have done...............than to regret something that you havent done.
Back to top Reply with quote
#3   re: Help Needed Who's online block
fr34k
CZ Super Newbie
fr34k has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Oct 29, 2004
0.00 posts per day
Posts: 36
Points: 464
   
Hi - thanks for the reply.
We are using nuke 7.9 fully patched running nuke sentinal (again all up to date).
We are using the Subsilver phpbb nuke forum which again is fully up to date.

I dont understand why the forums would have a function for showing guest and members online if this function is going to be useless in the fact it will never display any users online - kinda defeats the object of having one.

Our forum Who's online block (at the bottom of the forum index page) did actually show the amount of users online up until about 2 weeks ago - total number of guests and total members online - but has since stopped displaying the number of guests online only (it will still display the amount of registered members online).

I have posted this query elsewhere and i have gotten as far as someone asking me to check my nuke_sessions table in phpmyadmin (first seeing if i can access the table - then running a check table query to see what the end result is. Every message comes up as the sessions table is fine with no errors)

Any help on getting this fixed would be great.

Ive never heard of a forum that wont display users online and is just there for show and serves no real purpose. All the nuke forums i have visited display users online, kinda funny mine wont and possibly will never be able to.



Back to top Reply with quote
#4   re: Help Needed Who's online block
DAMIAN
CZ Active Member
 Codezwiz Site Donator
DAMIAN has been a member for over 20 year's 20 Year Member
usa.gif mississippi.gif
Occupation: Net Junkie
Age: 58
Gender: Male
Fav. Sports Team: steelers
Website:
Status: Offline
Joined: Aug 08, 2004
0.02 posts per day
Posts: 177
Points: 9,848
   
Have you added any new items to the site that runs off the db since it worked correctly last. You could be getting some conflict with something new.
If you have added a new item, try reloading a backup of the db, from before it started messing up, and see if it works fine, if so then you have an issue with something else interfering with it. That would be my next step just to eliminate one thing at a time.
(just make sure to make a current db backup first.)




_________________
[ Register or login to view links on this board.]
[ Register or login to view links on this board.]
[ Register or login to view links on this board.]

It is better to regret something that you have done...............than to regret something that you havent done.
Back to top Reply with quote
#5   re: Help Needed Who's online block
fr34k
CZ Super Newbie
fr34k has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Oct 29, 2004
0.00 posts per day
Posts: 36
Points: 464
   
Hi mate.
Thanks fo the reply.
We have recnetly added a few mods to our forums, some of which have required an sql input into our database.
i have looked at the mods added and i dont see how any of them could conflict with the guest online showing. The mods we have installed that require sql inputs are:

- Advanced Username Color - SQL input needed:

CREATE TABLE `nuke_bbadvanced_username_color` (
  `group_id` int(10) unsigned NOT NULL auto_increment,
  `group_name` varchar(255) NOT NULL default '',
  `group_color` varchar(6) NOT NULL default '',
  `group_weight` smallint(2) NOT NULL default '',
  PRIMARY KEY  (`group_id`)
) TYPE=MyISAM ;

ALTER TABLE nuke_users ADD user_color_gc VARCHAR(6) DEFAULT '';
ALTER TABLE nuke_users ADD user_color_gi TEXT DEFAULT NULL;


- Coloured Topic Title - SQL:

ALTER TABLE `nuke_bbtopics` ADD `topic_color` VARCHAR( 6 ) ;


- Board Message XL - SQL:

CREATE TABLE nuke_board_message (
  msg_id mediumint(8) NOT NULL auto_increment,
  title varchar(25) NOT NULL default '(empty)',
  message text NOT NULL,
  showpage smallint(5) NOT NULL default '0',
  auth tinyint(2) NOT NULL default '5',
  width smallint(3) NOT NULL default '75',
  starttime int(11) NOT NULL default '0',
  endtime int(11) NOT NULL default '0',
  startdate int(11) NOT NULL default '0',
  enddate int(11) NOT NULL default '0',
  users_timezone tinyint(1) NOT NULL default '0',
  bbcode_uid varchar(10) NOT NULL default '',
  days varchar(7) NOT NULL default '0000000',
  images varchar(100) default NULL,
  ordr smallint(3) NOT NULL default '0',
  PRIMARY KEY  (msg_id) );

INSERT INTO nuke_board_message (msg_id, title, message, showpage, auth, width, starttime, endtime, startdate, enddate, users_timezone, bbcode_uid, days, images, ordr) VALUES (1, 'All Pages', 'This message will be shown on all pages. It can be view by all visitors. The width of the table = 80%. It als display a gif file. Order 10', 9999, 0, 80, 946681200, 946681200, 988581600, 1293750000, 0, '', '1111111', '/images/default.gif', 10),
(3, 'Index Only', 'The message will be showed only on the index. Only for registered people. On all days. Order 20', 0, 1, 50, 946681200, 946681200, 1009839600, 1293750000, 0, '', '1111111', '', 20);


- Forum Sponsor Mod - SQL:

ALTER TABLE `nuke_bbforums` ADD `sponsor` TEXT NOT NULL;


- Complete Bannerads - SQL (in the readme: This MOD need a database update - uploaded the php install sql file and ran the file):

Complete_bannerads_db_update_php

#########################################################
## SQL commands to phpBB2
## Author: Niels Chr. Rød
## Nickname: Niels Chr. Denmark
## Email: [ Register or login to view links on this board. ]
##
## Ver 1.0.9
##
## phpBB2 database update script for mods
## this file is intended to use with phpBB2, when installing mods
## after so you may delete this file, but only admin can use so it really doesen't matter
## The script will look what prefix you are using, and use the existing DB defined by congig.php
## The execution of this script's included SQL is harmless, so you can run it as meny times you like
## note, though that the users last visit, will be set back to his/her last login,
## but that is a minor cosmetic isue, that will correct it self next time the use  logs in
##
## the following example are from my mods, and you can add some self, for other mods if you like
## you will after execution get a list over those commands that are run with succes and those with warnings !
## delete the sample lines if you are using it only for other mods
##
#########################################################

if (!eregi("modules.php", $PHP_SELF)) {
    die ("You can't access this file directly...");
}
if ($popup != "1"){
    $module_name = basename(dirname(__FILE__));
    require("modules/".$module_name."/nukebb.php");
}
else
{
    $phpbb_root_path = 'modules/Forums/';
}

define('IN_PHPBB', true);
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include('includes/functions_selects.php');
global $prefix;
define('BANNERS_TABLE', $prefix.'_banneradds');
define('BANNER_STATS_TABLE', $prefix.'_banneradds_stats');

###################################################################################################
##
## put the SQL commands below here, the SQL commands listed below are only exampels, substitude them with the one you need ##
##
###################################################################################################

$sql=array(
'CREATE TABLE '.BANNERS_TABLE.' (
banner_id MEDIUMINT(8) UNSIGNED NOT NULL,
banner_name TEXT NOT NULL,
banner_spot SMALLINT(1) UNSIGNED NOT NULL,
banner_forum MEDIUMINT(8) UNSIGNED NOT NULL,
banner_description VARCHAR(30) NOT NULL,
banner_url VARCHAR(90) NOT NULL,
banner_owner MEDIUMINT(8) NOT NULL,
banner_click MEDIUMINT(8) UNSIGNED NOT NULL,
banner_view MEDIUMINT(8) UNSIGNED NOT NULL,
banner_weigth TINYINT(1) UNSIGNED DEFAULT "50" NOT NULL,
banner_active TINYINT(1) NOT NULL,
banner_timetype TINYINT(1) NOT NULL,
time_begin INT(11) NOT NULL,
time_end INT(11) NOT NULL,
date_begin INT(11) NOT NULL,
date_end INT(11) NOT NULL,
banner_level TINYINT(1) NOT NULL,
banner_level_type TINYINT(1) NOT NULL,
banner_comment VARCHAR(50) NOT NULL,
banner_type MEDIUMINT(5) NOT NULL,
banner_width MEDIUMINT(5) UNSIGNED NOT NULL,
banner_height MEDIUMINT(5) NOT NULL,
banner_filter TINYINT(1) NOT NULL,
banner_filter_time MEDIUMINT(5) DEFAULT "600" NOT NULL,
INDEX (banner_id))',

'CREATE TABLE '.BANNER_STATS_TABLE.' (
banner_id MEDIUMINT(8) UNSIGNED NOT NULL,
click_date int (11) NOT NULL,
click_ip char(8) NOT NULL,
click_user MEDIUMINT(8) NOT NULL,
user_duration int (11) NOT NULL)');

$mods = array (
'Banner mod', 'Banner mod'
);

############################################### Do not change anything below this line #######################################

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX, $nukeuser);
init_userprefs($userdata);
//
// End session management
//


$n=0;
$message="<b>This list is a result of the SQL queries needed for mod</b><br/><br/>";
while($sql[$n])
{
   $message .= ($mods[$n-1] != $mods[$n]) ? '<p><b><font size=3>'.$mods[$n].'</font></b><br/>' : '';
   if(!$result = $db->sql_query($sql[$n]))
   $message .= '<b><font color=#FF0000>[Already added]</font></b> line: '.($n+1).' , '.$sql[$n].'<br />';
   else $message .='<b><font color=#0000fF>[Added/Updated]</font></b> line: '.($n+1).' , '.$sql[$n].'<br />';
   $n++;
}
message_die(GENERAL_MESSAGE, $message);
?>


- User Ranks (Updated for PHPNuke , phpBB By Telli [ Register or login to view links on this board. ] - SQL:

ALTER TABLE nuke_users ADD user_rank2 INT(11) AFTER user_rank;
UPDATE nuke_users SET user_rank2 = "0";


- Forum Statistics (Modified by Anor to work for bbtonuke (version 2.1) from [ Register or login to view links on this board. ] - install file:

<?php
        /***************************************************************************
                                   topsmilies_install.php
                                     -------------------
            begin                : Tue February 26 2002
            copyright            : (C) 2002 Nivisec.com
            email                : [ Register or login to view links on this board. ]
         
            $Id: topsmilies_install.php,v 1.2.2 2002/04/18 02:43:12 nivisec Exp $
         
         ***************************************************************************/
         
        /***************************************************************************
         *                                                                                         
         *   This program is free software; you can redistribute it and/or modify       
         *   it under the terms of the GNU General Public License as published by   
         *   the Free Software Foundation; either version 2 of the License, or             
         *   (at your option) any later version.
         *
         ***************************************************************************/

if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
    die ("You can't access this file directly...");
}
if ($popup != "1"){
    $module_name = basename(dirname(__FILE__));
    require("modules/".$module_name."/nukebb.php");
}
else
{
    $phpbb_root_path = 'modules/Forums/';
}

define('IN_PHPBB', true);
ini_set('ignore_user_abort', "1");
ini_set('max_execution_time', "120120");

include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

function top_smilies($message)
{
    global $db, $board_config;

    $sql = "SELECT code, smilies_id, smile_stat
    FROM " . SMILIES_TABLE;

    if( !$result = $db->sql_query($sql) )
    {
        message_die(GENERAL_ERROR, "Couldn't obtain smilies data", "", __LINE__, __FILE__, $sql);
    }
    $smile = $db->sql_fetchrowset($result);

    for ($i = 0; $i < count($smile); $i++)
    {
        if ($count_smile = preg_match_all ("/(?<=.\\W|\\W.|^\\W)" . phpbb_preg_quote($smile[$i]['code'], "/") . "(?=.\\W|\\W.|\\W$)/", ' ' . $message . ' ', $tmp_smile))
        {
            $smilie_usage = $smile[$i]['smile_stat'] + $count_smile;
            $sql = 'UPDATE ' . SMILIES_TABLE . '
            SET smile_stat = ' . $smilie_usage . '
            WHERE smilies_id = ' . $smile[$i]['smilies_id'];

            if( !$result = $db->sql_query($sql) )
            {
                message_die(GENERAL_ERROR, "Couldn't update smilies data", "", __LINE__, __FILE__, $sql);
            }
        }
    }
}

if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']))
{
    $mode = (isset($HTTP_POST_VARS['mode'])) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
}

$userdata = session_pagestart($user_ip, PAGE_INDEX, $board_config['session_length'], $nukeuser);
init_userprefs($userdata);

if ($userdata['user_level'] != ADMIN)
{
    die('Please log into an administrator enabled account before running this script');
}

print '<html><body>Please make sure to delete this file after you install/uninstall the new table addition to prevent security problems!';
print '<br /><a href="modules.php?name=Forums&file=topsmilies_install&mode=change">Install the new database field</a><br />';
print '<br /><a href="topsmilies_install&mode=uninstall">Un-install the new database field</a><br />';
print '<br /><a href="modules.php?name=Forums&file=topsmilies_install&mode=import">Import your old smilies into the new database field.  Do this only after you have created it!<font color="red"> This WILL take some time if you have a lot of posts</font></a><br />';

if ($mode == 'change')
{
    $sql = "ALTER TABLE " . SMILIES_TABLE . "
    ADD smile_stat MEDIUMINT UNSIGNED DEFAULT 0 NOT NULL";

    if (!$db->sql_query($sql))
    {
        print '<br><br><font color="red">Unable to insert smile_stat field<br>Maybe it is already inserted?</font><br>SQL Used: ' . $sql;
    }
    else
    {
        print '<br><br><font color="blue">Inserted smile_stat field...</font><br>SQL Used: ' . $sql;
    }
    print '<hr>Checking Values, make sure they contain data!  You should see the smilie code and a number after each, probably the number 0.<br>If you do not see these values, you will have to add this table field manually to get smilies to work!<br><br>';
    $sql = "SELECT code, smile_stat FROM " . SMILIES_TABLE;
    $result = $db->sql_query($sql);
    print '<br><br>';
    while ($row = $db->sql_fetchrow($result))
    {
        print '<br>Smilie Code: ' . $row['code'] . '</td><td>Smilie Uses: ' . $row['smile_stat'];
    }
}
else if ($mode == 'uninstall')
{
    $sql = "ALTER TABLE " . SMILIES_TABLE . "
    DROP smile_stat";
    if (!$db->sql_query($sql))
    {
        print '<br><br><font color="red">Unable to DROP smile_stat field.  Perhaps it is already dropped?</font><br>SQL Used: ' . $sql;
    }
    else
    {
        print '<br><br><font color="blue">Dropped smile_stat field.</font><br>SQL Used: ' . $sql;
    }
}
else if ($mode == 'import')
{
    $sql = "SELECT MAX(post_id) as max, MIN(post_id) as min
    FROM " . POSTS_TABLE;

    $result = $db->sql_query($sql);

    $postrow = $db->sql_fetchrow($result);

    print '<br />Starting ID = ' .$postrow['min'];
    print '<br />Ending ID = ' .$postrow['max'];
     
    for ($i = $postrow['min']; $i <= $postrow['max']; $i++)
    {
        $sql = "SELECT post_id, post_text
        FROM " . POSTS_TEXT_TABLE . "
        WHERE post_id = " . $i;
        $result = $db->sql_query($sql);

        $row = $db->sql_fetchrow($result);

        top_smilies($row['post_text']);
        print '<br>Post: ' . $i . ' Done.';
    }
}
?>
</body></html>


We have added a few other small mods to the forum - none of which required any changes to be made via SQL.

I dont think any of the above mods had anything to do with disabeling guests being shown online.

Thanks for the replies.
Darren


Back to top Reply with quote
#6   re: Help Needed Who's online block
DAMIAN
CZ Active Member
 Codezwiz Site Donator
DAMIAN has been a member for over 20 year's 20 Year Member
usa.gif mississippi.gif
Occupation: Net Junkie
Age: 58
Gender: Male
Fav. Sports Team: steelers
Website:
Status: Offline
Joined: Aug 08, 2004
0.02 posts per day
Posts: 177
Points: 9,848
   
Id almost bet that the user rank, or name color mod is now causing a conflict. The only way to know for sure is upload a backup of the db from before the changes and see if it doesnt work then. If so, then thatlly tell ya its one of those mods you added. Just have to narrow it down to wich one. If you ck the back up and it works, then add a backup with just one of the mods and see if its still working, slowly finding and eliminating the one causing the conflict.
Its not that it necessarily has a direct interaction with the whosonline part, but could be creating a conflict in the site being able to read that part of the db or not letting it read that part of the db because of a redirect before it gets to it.





_________________
[ Register or login to view links on this board.]
[ Register or login to view links on this board.]
[ Register or login to view links on this board.]

It is better to regret something that you have done...............than to regret something that you havent done.
Back to top Reply with quote
#7   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,440
   
Or the theme variable for guests online is not correct in that theme tpl file.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#8   re: Help Needed Who's online block
fr34k
CZ Super Newbie
fr34k has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Oct 29, 2004
0.00 posts per day
Posts: 36
Points: 464
   
Hi,
Thanks for the replies (i apologise for the late response).
I have removed the ranks mod and the coloured username mod - but there is no change in the guests list (still being displayed as 0)

We thought as you suggested that this problem could be in relation to a conflict between a mod we have added to our forum. To check if this is correct we have since uploaded our themes included forum and still no change.

I just cant figure out whats happened to this.
Any more suggestions and help would be greatly apreciated

thanks
darren



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum