MyBB Community Forums

Full Version: Count Forum Viewers (Problem)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
I am using Count Forum Viewers 2.0 and the problem is, it is not showing at all? I think it is not working and i don' have a clue why it is not working.
Can i see the content of the forumbit_depth2_forum template? it should have

{$viewscount}

regards
there is a {$viewscount}

<tr>
<td class="trow2" align="center" valign="middle"><img src="{$theme['imgdir']}/{$lightbulb['folder']}.gif" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" /></td>
<td class="trow1" valign="top">
<strong><a href="forumdisplay.php?fid={$forum['fid']}">{$forum['name']}</a></strong> {$viewscount}    <div class="smalltext">{$forum['description']}{$subforums}</div>
</td>
<td class="trow2" width="236" valign="top" align="left" nowrap="nowrap">$lastpost</td>
<td class="trow1" width="16" valign="middle" align="center" nowrap="nowrap">$threads</td>
<td class="trow2" width="20" valign="middle" align="center" nowrap="nowrap">$posts</td>
</tr>

Alright then probably there is no body viewing the forum. In count forums viewer settings you can enable it to show up even if Zero are viewing.
It is not even showing (0 viewing) thing too???
I have test again on 1.2.3 and it is working perfectly.

Please open ./inc/functions_forumlist.php

Can you find this query

$query = $db->query("SELECT uid FROM ".TABLE_PREFIX."sessions WHERE time>'$timecut' AND location1='".$forum['fid']."'");
Oh i am using 1.2.2 is it only for 1.2.3?
No No it works on 1.2.2.

But this query is the plugin's query, if it is not there then the core coded of the plugin are not there.
The activate and deactivate thing is there and so are the options at the "change", so how can i fixed it?
Open .//inc/functions_forumlist.php

Find

// Call lastpost template
eval("\$lastpost = \"".$templates->get("forumbit_depth$depth$forumcat"."_lastpost")."\";");
Above it add
global $db;
					$timecut = time() - $mybb->settings['wolcutoff'];
					$total = 0;
					$query = $db->query("SELECT uid FROM ".TABLE_PREFIX."sessions WHERE time>'$timecut' AND location1='".$forum['fid']."'");	
					$total = mysql_num_rows($query);

					if($mybb->settings['cfvhide'] == "no")
					{
						$viewscount = str_replace("{1}", $total, $mybb->settings['cfv']);
					} 
					elseif ($mybb->settings['cfvhide'] == "yes" && $total != 0) 
					{
						$viewscount = str_replace("{1}", $total, $mybb->settings['cfv']);
					}
					else 
					{
						$viewscount = "";
					}


It seems you haven't followed the instructions previously to chmod this file to 777.

regards
Pages: 1 2 3 4 5