OLD | NEW | ||
| (https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Ftinyadminresources.com%2Fextras%2Fimagehost%2Fscript%2Fuploads%2F11dc58ff67.jpg&hash=0ba21db5426f032ed739e08065e1d7e83e4a83e5) | (https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Ftinyadminresources.com%2Fextras%2Fimagehost%2Fscript%2Fuploads%2F7395bed8a8.jpg&hash=3dd0ce9b43720cae8af0dacba0568d60631dfbf5) |
global $context, $settings, $options, $scripturl, $txt, $user_info, $modSettings;
$bullet = '<img src="'.$settings['images_url'].'/TPdivider.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet2 = '<img src="'.$settings['images_url'].'/TPdivider2.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet3 = '<img src="'.$settings['images_url'].'/TPdivider3.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet4 = '<img src="'.$settings['images_url'].'/tpgoto.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet5 = '<img src="'.$settings['images_url'].'/tpmodule2.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
echo'
<div class="smalltext" style="font-family: verdana, arial, sans-serif;">';
if(isset($context['TPortal']['userbox']['stats']))
// members stats
echo '
<img src="'.$settings['images_url'].'/icons/members.gif" style="margin: 0;" align="bottom" alt="" />
<a href="'.$scripturl.'?action=mlist"><b>'.$txt[19].'</b></a>
<br />'.$bullet.$txt[488].': ' , isset($modSettings['memberCount']) ? $modSettings['memberCount'] : $modSettings['totalMembers'] , '
<br />'.$bullet.$txt['tp-latest']. ': <a href="', $scripturl, '?action=profile;u=', $modSettings['latestMember'], '"><b>', $modSettings['latestRealName'], '</b></a>';
if(isset($context['TPortal']['userbox']['stats_all']))
global $db_prefix,$modSettings;
$today = strtotime("24 hours ago");
date('j') == 1 ? $thismonth = $today : $thismonth = strtotime(date('F') . ' 1');
date('l') == 'Sunday' ? $thisweek = $today : $thisweek = strtotime('last Sunday');
date('M') == 'January' ? $thisyear = $thismonth : $thisyear = strtotime('January 1');
$query = db_query("SELECT
COUNT(dateRegistered > $thisyear OR NULL) as year,
COUNT(dateRegistered > $thismonth OR NULL) as month,
COUNT(dateRegistered > $thisweek OR NULL) as week,
COUNT(dateRegistered > $today OR NULL) as today
FROM {$db_prefix}members
WHERE is_activated = 1", __FILE__, __LINE__);
$row = mysql_fetch_assoc($query);
settype($row['today'], "integer");
settype($row['week'], "integer");
settype($row['month'], "integer");
echo '<br />',$bullet,'New This Month: ', $row['month'],'<br />';
echo $bullet,'New This Week: ', $row['week'],'<br />';
echo $bullet,'New Today: ', $row['today'];
// more stats
echo '
<hr /><img src="'.$settings['images_url'].'/icons/info.gif" style="margin: 0;" align="bottom" alt="" />
<a href="'.$scripturl.'?action=stats"><b>'.$txt['tp-stats'].'</b></a>
<br />'.$bullet.$txt[489].': '.$modSettings['totalMessages']. '
<br />'.$bullet. $txt[490].': '.$modSettings['totalTopics']. '
<br />'.$bullet.$txt['tp-mostonline-today'].': '.$modSettings['mostOnlineToday'].'
<br />'.$bullet.$txt['tp-mostonline'].': '.$modSettings['mostOnline'].'<br />
('.timeformat($modSettings['mostDate']).')
';
if(isset($context['TPortal']['userbox']['online'])){
// add online users
echo '<hr /><img src="'.$settings['images_url'].'/icons/online.gif" style="margin: 0;" align="bottom" alt="" />
<a href="'.$scripturl.'?action=who"><b>'.$txt[158].'</b></a><br />';
$online = ssi_whosOnline('array');
echo $bullet.$txt['tp-users'].': '.$online['num_users'];
echo '<br />'.$bullet.$txt['tp-guests'].': '.$online['guests'];
echo '<br />'.$bullet.$txt['tp-total'].': '.$online['total_users'].'<hr />
<div style="width: 100%; ' , $online['num_users']>14 ? 'height: 23ex;overflow: auto;' : '' ,'">';
foreach($online['users'] as $user){
echo $bullet2 , $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'];
echo '<br />';
}
echo '</div>';
}
echo '</div>
</div>';
global $context, $settings, $options, $scripturl, $txt, $user_info, $modSettings;
$bullet = '<img src="'.$settings['images_url'].'/TPdivider.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet2 = '<img src="'.$settings['images_url'].'/TPdivider2.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet3 = '<img src="'.$settings['images_url'].'/TPdivider3.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet4 = '<img src="'.$settings['images_url'].'/tpgoto.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet5 = '<img src="'.$settings['images_url'].'/tpmodule2.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
echo'
<div class="smalltext" style="font-family: verdana, arial, sans-serif;">';
if(isset($context['TPortal']['userbox']['stats']))
// members stats
echo '
<img src="'.$settings['images_url'].'/icons/members.gif" style="margin: 0;" align="bottom" alt="" />
<a href="'.$scripturl.'?action=mlist"><b>'.$txt[19].'</b></a>
<br />'.$bullet.$txt[488].': ' , isset($modSettings['memberCount']) ? $modSettings['memberCount'] : $modSettings['totalMembers'] , '
<br />'.$bullet.$txt['tp-latest']. ': <a href="', $scripturl, '?action=profile;u=', $modSettings['latestMember'], '"><b>', $modSettings['latestRealName'], '</b></a>';
if(isset($context['TPortal']['userbox']['stats_all']))
global $db_prefix,$modSettings;
$today = strtotime("24 hours ago");
date('j') == 1 ? $thismonth = $today : $thismonth = strtotime(date('F') . ' 1');
date('l') == 'Sunday' ? $thisweek = $today : $thisweek = strtotime('last Sunday');
date('M') == 'January' ? $thisyear = $thismonth : $thisyear = strtotime('January 1');
$query = db_query("SELECT
COUNT(dateRegistered > $thisyear OR NULL) as year,
COUNT(dateRegistered > $thismonth OR NULL) as month,
COUNT(dateRegistered > $thisweek OR NULL) as week,
COUNT(dateRegistered > $today OR NULL) as today
FROM {$db_prefix}members
WHERE is_activated = 1", __FILE__, __LINE__);
$row = mysql_fetch_assoc($query);
settype($row['today'], "integer");
settype($row['week'], "integer");
settype($row['month'], "integer");
echo '<br />',$bullet,'New This Month: ', $row['month'],'<br />';
echo $bullet,'New This Week: ', $row['week'],'<br />';
echo $bullet,'New Today: ', $row['today'];
// more stats
echo '
<hr /><img src="'.$settings['images_url'].'/icons/info.gif" style="margin: 0;" align="bottom" alt="" />
<a href="'.$scripturl.'?action=stats"><b>'.$txt['tp-stats'].'</b></a>
<br />'.$bullet.$txt[489].': '.$modSettings['totalMessages']. '
<br />'.$bullet. $txt[490].': '.$modSettings['totalTopics']. '
<br />'.$bullet.$txt['tp-mostonline-today'].': '.$modSettings['mostOnlineToday'].'
<br />'.$bullet.$txt['tp-mostonline'].': '.$modSettings['mostOnline'].'<br />
('.timeformat($modSettings['mostDate']).')
';
if(isset($context['TPortal']['userbox']['online'])){
// add online users
echo '<hr /><img src="'.$settings['images_url'].'/icons/online.gif" style="margin: 0;" align="bottom" alt="" />
<a href="'.$scripturl.'?action=who"><b>'.$txt[158].'</b></a><br />';
$online = ssi_whosOnline('array');
echo $bullet.$txt['tp-users'].': '.$online['num_users'];
echo '<br />'.$bullet.$txt['tp-guests'].': '.$online['guests'];
// --- Begin FlashChat Integration ---
echo '<br />', $bullet, 'In Chat: ', $online['num_chat'];
// --- End FlashChat Integration ---
echo '<br />'.$bullet.$txt['tp-total'].': '.$online['total_users'].'<hr />
<div style="width: 100%; ' , $online['num_users']>14 ? 'height: 23ex;overflow: auto;' : '' ,'">';
foreach($online['users'] as $user){
echo $bullet2 , $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'];
echo '<br />';
}
echo '</div>';
// --- Begin FlashChat Integration ---
echo '
<hr />
<img src="/chat.gif"><a href="'.$scripturl.'?action=chat"><b> Users in Chat</b></a><br />
<div style="width: 100%; ', ($online['num_chat'] > 14 ? 'height: 23ex;overflow: auto;' : ''), '">';
foreach ($online['users_chat'] as $user)
{
echo '
', $bullet2, $user['link'], ' (', (!$user['chat']['room']['public'] ? $txt['fc_private_room'] : $user['chat']['room']['name']), ')
<br />';
}
// No chat users?
if(empty($online['users_chat']))
echo '<br />No members in chat';
echo '
</div>';
// --- End FlashChat Integration ---
}
echo '</div>';
// add arcade users
echo '<div class="smalltext" style="font-family: verdana, arial, sans-serif;">
<hr />
<img src="/arcade.png"><a href="'.$scripturl.'?action=arcade"><b> Users in Arcade</b></a><br />';
//added code
echo' <div style="width: 100%; ' , $online['num_users']>14 ? 'height: 23ex;overflow: auto;' : '' ,'">';
// Its ok now bullits have flown by stand up again lol
$online = ssi_whosOnline('array');
$arcade_users = array();
foreach($online['users'] as $user)
{
$result = db_query("
SELECT url
FROM {$db_prefix}log_online
WHERE ID_MEMBER = $user[id]",__FILE__, __LINE__);
$checkit = mysql_fetch_assoc($result);
$data = @unserialize($checkit['url']);
if($data['action']=='arcade')
{
echo $bullet2 , $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link']; echo '<br />';
$arcade_users[] = $user;
}
unset($data);
}
// No arcade users?
if(empty($arcade_users))
echo '<br />No members in the arcade';
// end wdmboard_statsonline
echo'</div>
</div>
</div>';
global $context, $settings, $options, $scripturl, $txt, $user_info, $modSettings;
$bullet = '<img src="'.$settings['images_url'].'/TPdivider.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet2 = '<img src="'.$settings['images_url'].'/TPdivider2.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet3 = '<img src="'.$settings['images_url'].'/TPdivider3.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet4 = '<img src="'.$settings['images_url'].'/tpgoto.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet5 = '<img src="'.$settings['images_url'].'/tpmodule2.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
echo'
<div class="smalltext" style="font-family: verdana, arial, sans-serif;">';
if(isset($context['TPortal']['userbox']['stats']))
// members stats
echo '
<img src="'.$settings['images_url'].'/icons/members.gif" style="margin: 0;" align="bottom" alt="" />
<a href="'.$scripturl.'?action=mlist"><b>'.$txt[19].'</b></a>
<br />'.$bullet.$txt[488].': ' , isset($modSettings['memberCount']) ? $modSettings['memberCount'] : $modSettings['totalMembers'] , '
<br />'.$bullet.$txt['tp-latest']. ': <a href="', $scripturl, '?action=profile;u=', $modSettings['latestMember'], '"><b>', $modSettings['latestRealName'], '</b></a>';
if(isset($context['TPortal']['userbox']['stats_all']))
global $db_prefix,$modSettings;
$today = strtotime("24 hours ago");
date('j') == 1 ? $thismonth = $today : $thismonth = strtotime(date('F') . ' 1');
date('l') == 'Sunday' ? $thisweek = $today : $thisweek = strtotime('last Sunday');
date('M') == 'January' ? $thisyear = $thismonth : $thisyear = strtotime('January 1');
$query = db_query("SELECT
COUNT(dateRegistered > $thisyear OR NULL) as year,
COUNT(dateRegistered > $thismonth OR NULL) as month,
COUNT(dateRegistered > $thisweek OR NULL) as week,
COUNT(dateRegistered > $today OR NULL) as today
FROM {$db_prefix}members
WHERE is_activated = 1", __FILE__, __LINE__);
$row = mysql_fetch_assoc($query);
settype($row['today'], "integer");
settype($row['week'], "integer");
settype($row['month'], "integer");
echo '<br />',$bullet,'New This Month: ', $row['month'],'<br />';
echo $bullet,'New This Week: ', $row['week'],'<br />';
echo $bullet,'New Today: ', $row['today'];
// more stats
echo '
<hr /><img src="'.$settings['images_url'].'/icons/info.gif" style="margin: 0;" align="bottom" alt="" />
<a href="'.$scripturl.'?action=stats"><b>'.$txt['tp-stats'].'</b></a>
<br />'.$bullet.$txt[489].': '.$modSettings['totalMessages']. '
<br />'.$bullet. $txt[490].': '.$modSettings['totalTopics']. '
<br />'.$bullet.$txt['tp-mostonline-today'].': '.$modSettings['mostOnlineToday'].'
<br />'.$bullet.$txt['tp-mostonline'].': '.$modSettings['mostOnline'].'<br />
('.timeformat($modSettings['mostDate']).')
';
if(isset($context['TPortal']['userbox']['online'])){
// add online users
echo '<hr /><img src="'.$settings['images_url'].'/icons/online.gif" style="margin: 0;" align="bottom" alt="" />
<a href="'.$scripturl.'?action=who"><b>'.$txt[158].'</b></a><br />';
$online = ssi_whosOnline('array');
echo $bullet.$txt['tp-users'].': '.$online['num_users'];
echo '<br />'.$bullet.$txt['tp-guests'].': '.$online['guests'];
// --- Begin FlashChat Integration ---
echo '<br />', $bullet, 'In Chat: ', $online['num_chat'];
// --- End FlashChat Integration ---
echo '<br />'.$bullet.$txt['tp-total'].': '.$online['total_users'].'<hr />
<div style="width: 100%; ' , $online['num_users']>14 ? 'height: 23ex;overflow: auto;' : '' ,'">';
foreach($online['users'] as $user){
echo $bullet2 , $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'];
echo '<br />';
}
echo '</div>';
}
echo '</div>';
// add arcade users
echo '<div class="smalltext" style="font-family: verdana, arial, sans-serif;">
<hr />
<img src="/arcade.png"><a href="'.$scripturl.'?action=arcade"><b> Users in Arcade</b></a><br />';
//added code
echo' <div style="width: 100%; ' , $online['num_users']>14 ? 'height: 23ex;overflow: auto;' : '' ,'">';
// Its ok now bullits have flown by stand up again lol
$online = ssi_whosOnline('array');
$arcade_users = array();
foreach($online['users'] as $user)
{
$result = db_query("
SELECT url
FROM {$db_prefix}log_online
WHERE ID_MEMBER = $user[id]",__FILE__, __LINE__);
$checkit = mysql_fetch_assoc($result);
$data = @unserialize($checkit['url']);
if($data['action']=='arcade')
{
echo $bullet2 , $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link']; echo '<br />';
$arcade_users[] = $user;
}
unset($data);
}
// No arcade users?
if(empty($arcade_users))
echo '<br />No members in the arcade';
// end wdmboard_statsonline
echo'</div>
</div>
</div>';global $context, $settings, $options, $scripturl, $txt, $user_info, $modSettings;
$bullet = '<img src="'.$settings['images_url'].'/TPdivider.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet2 = '<img src="'.$settings['images_url'].'/TPdivider2.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet3 = '<img src="'.$settings['images_url'].'/TPdivider3.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet4 = '<img src="'.$settings['images_url'].'/tpgoto.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet5 = '<img src="'.$settings['images_url'].'/tpmodule2.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
echo'
<div class="smalltext" style="font-family: verdana, arial, sans-serif;">';
if(isset($context['TPortal']['userbox']['stats']))
// members stats
echo '
<img src="'.$settings['images_url'].'/icons/members.gif" style="margin: 0;" align="bottom" alt="" />
<a href="'.$scripturl.'?action=mlist"><b>'.$txt[19].'</b></a>
<br />'.$bullet.$txt[488].': ' , isset($modSettings['memberCount']) ? $modSettings['memberCount'] : $modSettings['totalMembers'] , '
<br />'.$bullet.$txt['tp-latest']. ': <a href="', $scripturl, '?action=profile;u=', $modSettings['latestMember'], '"><b>', $modSettings['latestRealName'], '</b></a>';
if(isset($context['TPortal']['userbox']['stats_all']))
global $db_prefix,$modSettings;
$today = strtotime("24 hours ago");
date('j') == 1 ? $thismonth = $today : $thismonth = strtotime(date('F') . ' 1');
date('l') == 'Sunday' ? $thisweek = $today : $thisweek = strtotime('last Sunday');
date('M') == 'January' ? $thisyear = $thismonth : $thisyear = strtotime('January 1');
$query = db_query("SELECT
COUNT(dateRegistered > $thisyear OR NULL) as year,
COUNT(dateRegistered > $thismonth OR NULL) as month,
COUNT(dateRegistered > $thisweek OR NULL) as week,
COUNT(dateRegistered > $today OR NULL) as today
FROM {$db_prefix}members
WHERE is_activated = 1", __FILE__, __LINE__);
$row = mysql_fetch_assoc($query);
settype($row['today'], "integer");
settype($row['week'], "integer");
settype($row['month'], "integer");
echo '<br />',$bullet,'New This Month: ', $row['month'],'<br />';
echo $bullet,'New This Week: ', $row['week'],'<br />';
echo $bullet,'New Today: ', $row['today'];
// more stats
echo '
<hr /><img src="'.$settings['images_url'].'/icons/info.gif" style="margin: 0;" align="bottom" alt="" />
<a href="'.$scripturl.'?action=stats"><b>'.$txt['tp-stats'].'</b></a>
<br />'.$bullet.$txt[489].': '.$modSettings['totalMessages']. '
<br />'.$bullet. $txt[490].': '.$modSettings['totalTopics']. '
<br />'.$bullet.$txt['tp-mostonline-today'].': '.$modSettings['mostOnlineToday'].'
<br />'.$bullet.$txt['tp-mostonline'].': '.$modSettings['mostOnline'].'<br />
('.timeformat($modSettings['mostDate']).')
';
if(isset($context['TPortal']['userbox']['online'])){
// add online users
echo '<hr /><img src="'.$settings['images_url'].'/icons/online.gif" style="margin: 0;" align="bottom" alt="" />
<a href="'.$scripturl.'?action=who"><b>'.$txt[158].'</b></a><br />';
$online = ssi_whosOnline('array');
echo $bullet.$txt['tp-users'].': '.$online['num_users'];
echo '<br />'.$bullet.$txt['tp-guests'].': '.$online['guests'];
// --- Begin FlashChat Integration ---
echo '<br />', $bullet, 'In Chat: ', $online['num_chat'];
// --- End FlashChat Integration ---
echo '<br />'.$bullet.$txt['tp-total'].': '.$online['total_users'].'<hr />
<div style="width: 100%; ' , $online['num_users']>14 ? 'height: 23ex;overflow: auto;' : '' ,'">';
foreach($online['users'] as $user){
echo $bullet2 , $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'];
echo '<br />';
}
echo '</div>';
// --- Begin FlashChat Integration ---
echo '
<hr />
<img src="/chat.png"><a href="'.$scripturl.'?action=chat"> <b>Users in Chat</b></a><br />
<div style="width: 100%; ', ($online['num_chat'] > 14 ? 'height: 23ex;overflow: auto;' : ''), '">';
foreach ($online['users_chat'] as $user)
{
echo '
', $bullet2, $user['link'], ' (', (!$user['chat']['room']['public'] ? $txt['fc_private_room'] : $user['chat']['room']['name']), ')
<br />';
}
echo '
</div>';
// --- End FlashChat Integration ---
}
echo '</div>
</div>';
QuoteDid you copy the entire code and put it in a PHP block?
<img src="/chat.png"><a href="'.$scripturl.'?action=chat"> <b>Users in Chat</b></a><br />http://www.ga-squad.com/chat/flashchat.phpQuote from: Bluto on August 20, 2008, 10:45:54 PM
I put all the info in a php box and it all works fine, except for the chat integration.
I was trying to get around the regular flash chat integration as it is a boat load of file edits, and Iusuallyalways end up with an error.
Am I supposed to already have the Flash Chat Integration installed?
Site: www.ga-squad.com
SMF1.1.5
TP 1.0.5
Theme: Helios_Multi_tp
Edit: Additional Info.
In the script it shows,Code Select<img src="/chat.png"><a href="'.$scripturl.'?action=chat"> <b>Users in Chat</b></a><br />
My url actually shows,Code Selecthttp://www.ga-squad.com/chat/flashchat.php
instead of the expected "action =page"
I don't have friendly url's enabled in settings either, if that makes a difference.
Quote from: Bluto on August 21, 2008, 03:38:37 AM
Bummer. I can't install it through the package manager.
Quote from: Lord Anubis on March 31, 2008, 07:35:55 PM
Flash Chat users can use this one
Screenshot:
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Ftinyadminresources.com%2Fextras%2Fimagehost%2Fscript%2Fuploads%2F93f4d43abd.jpg&hash=59e8d1598d3b93f928e33587b7d9641b58e8c523)
Quote from: Lord Anubis on March 31, 2008, 05:44:20 PM
Flash Chat users and E-Arcade users can use this one
Must have Flash Chat Integration Mod installed and E-Arcade (http://www.ericsworld.eu/f2/index.php)
Screenshot:
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fnextsite.org%2Fforum%2Fimagehost%2Fuploads%2Fe983337e6e.png&hash=40f9c5f57bd639cdca8877e50056936d833e5b3a)
Upload chat.png and arcade.png to the root of your forum and use a PHP BLOCKCode Selectglobal $context, $settings, $options, $scripturl, $txt, $user_info, $modSettings;
$bullet = '<img src="'.$settings['images_url'].'/TPdivider.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet2 = '<img src="'.$settings['images_url'].'/TPdivider2.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet3 = '<img src="'.$settings['images_url'].'/TPdivider3.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet4 = '<img src="'.$settings['images_url'].'/tpgoto.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet5 = '<img src="'.$settings['images_url'].'/tpmodule2.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
echo'
<div class="smalltext" style="font-family: verdana, arial, sans-serif;">';
if(isset($context['TPortal']['userbox']['stats']))
// members stats
echo '
<img src="'.$settings['images_url'].'/icons/members.gif" style="margin: 0;" align="bottom" alt="" />
<a href="'.$scripturl.'?action=mlist"><b>'.$txt[19].'</b></a>
<br />'.$bullet.$txt[488].': ' , isset($modSettings['memberCount']) ? $modSettings['memberCount'] : $modSettings['totalMembers'] , '
<br />'.$bullet.$txt['tp-latest']. ': <a href="', $scripturl, '?action=profile;u=', $modSettings['latestMember'], '"><b>', $modSettings['latestRealName'], '</b></a>';
if(isset($context['TPortal']['userbox']['stats_all']))
global $db_prefix,$modSettings;
$today = strtotime("24 hours ago");
date('j') == 1 ? $thismonth = $today : $thismonth = strtotime(date('F') . ' 1');
date('l') == 'Sunday' ? $thisweek = $today : $thisweek = strtotime('last Sunday');
date('M') == 'January' ? $thisyear = $thismonth : $thisyear = strtotime('January 1');
$query = db_query("SELECT
COUNT(dateRegistered > $thisyear OR NULL) as year,
COUNT(dateRegistered > $thismonth OR NULL) as month,
COUNT(dateRegistered > $thisweek OR NULL) as week,
COUNT(dateRegistered > $today OR NULL) as today
FROM {$db_prefix}members
WHERE is_activated = 1", __FILE__, __LINE__);
$row = mysql_fetch_assoc($query);
settype($row['today'], "integer");
settype($row['week'], "integer");
settype($row['month'], "integer");
echo '<br />',$bullet,'New This Month: ', $row['month'],'<br />';
echo $bullet,'New This Week: ', $row['week'],'<br />';
echo $bullet,'New Today: ', $row['today'];
// more stats
echo '
<hr /><img src="'.$settings['images_url'].'/icons/info.gif" style="margin: 0;" align="bottom" alt="" />
<a href="'.$scripturl.'?action=stats"><b>'.$txt['tp-stats'].'</b></a>
<br />'.$bullet.$txt[489].': '.$modSettings['totalMessages']. '
<br />'.$bullet. $txt[490].': '.$modSettings['totalTopics']. '
<br />'.$bullet.$txt['tp-mostonline-today'].': '.$modSettings['mostOnlineToday'].'
<br />'.$bullet.$txt['tp-mostonline'].': '.$modSettings['mostOnline'].'<br />
('.timeformat($modSettings['mostDate']).')
';
if(isset($context['TPortal']['userbox']['online'])){
// add online users
echo '<hr /><img src="'.$settings['images_url'].'/icons/online.gif" style="margin: 0;" align="bottom" alt="" />
<a href="'.$scripturl.'?action=who"><b>'.$txt[158].'</b></a><br />';
$online = ssi_whosOnline('array');
echo $bullet.$txt['tp-users'].': '.$online['num_users'];
echo '<br />'.$bullet.$txt['tp-guests'].': '.$online['guests'];
// --- Begin FlashChat Integration ---
echo '<br />', $bullet, 'In Chat: ', $online['num_chat'];
// --- End FlashChat Integration ---
echo '<br />'.$bullet.$txt['tp-total'].': '.$online['total_users'].'<hr />
<div style="width: 100%; ' , $online['num_users']>14 ? 'height: 23ex;overflow: auto;' : '' ,'">';
foreach($online['users'] as $user){
echo $bullet2 , $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'];
echo '<br />';
}
echo '</div>';
// --- Begin FlashChat Integration ---
echo '
<hr />
<img src="/chat.gif"><a href="'.$scripturl.'?action=chat"><b> Users in Chat</b></a><br />
<div style="width: 100%; ', ($online['num_chat'] > 14 ? 'height: 23ex;overflow: auto;' : ''), '">';
foreach ($online['users_chat'] as $user)
{
echo '
', $bullet2, $user['link'], ' (', (!$user['chat']['room']['public'] ? $txt['fc_private_room'] : $user['chat']['room']['name']), ')
<br />';
}
// No chat users?
if(empty($online['users_chat']))
echo '<br />No members in chat';
echo '
</div>';
// --- End FlashChat Integration ---
}
echo '</div>';
// add arcade users
echo '<div class="smalltext" style="font-family: verdana, arial, sans-serif;">
<hr />
<img src="/arcade.png"><a href="'.$scripturl.'?action=arcade"><b> Users in Arcade</b></a><br />';
//added code
echo' <div style="width: 100%; ' , $online['num_users']>14 ? 'height: 23ex;overflow: auto;' : '' ,'">';
// Its ok now bullits have flown by stand up again lol
$online = ssi_whosOnline('array');
$arcade_users = array();
foreach($online['users'] as $user)
{
$result = db_query("
SELECT url
FROM {$db_prefix}log_online
WHERE ID_MEMBER = $user[id]",__FILE__, __LINE__);
$checkit = mysql_fetch_assoc($result);
$data = @unserialize($checkit['url']);
if($data['action']=='arcade')
{
echo $bullet2 , $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link']; echo '<br />';
$arcade_users[] = $user;
}
unset($data);
}
// No arcade users?
if(empty($arcade_users))
echo '<br />No members in the arcade';
// end wdmboard_statsonline
echo'</div>
</div>
</div>';
OR
For users that just want to show arcade users and have E-Arcade (http://www.ericsworld.eu/f2/index.php) installed can use this code
(REMEMBER TO STILL UPLOAD THE arcade.png TO THE ROOT OF YOUR FORUM!!!)
Screenshot:
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fnextsite.org%2Fforum%2Fimagehost%2Fuploads%2F4d88668e36.png&hash=52543082a662d0c4c3283fc0a00ff046cf10cecf)Code Selectglobal $context, $settings, $options, $scripturl, $txt, $user_info, $modSettings;
$bullet = '<img src="'.$settings['images_url'].'/TPdivider.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet2 = '<img src="'.$settings['images_url'].'/TPdivider2.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet3 = '<img src="'.$settings['images_url'].'/TPdivider3.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet4 = '<img src="'.$settings['images_url'].'/tpgoto.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet5 = '<img src="'.$settings['images_url'].'/tpmodule2.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
echo'
<div class="smalltext" style="font-family: verdana, arial, sans-serif;">';
if(isset($context['TPortal']['userbox']['stats']))
// members stats
echo '
<img src="'.$settings['images_url'].'/icons/members.gif" style="margin: 0;" align="bottom" alt="" />
<a href="'.$scripturl.'?action=mlist"><b>'.$txt[19].'</b></a>
<br />'.$bullet.$txt[488].': ' , isset($modSettings['memberCount']) ? $modSettings['memberCount'] : $modSettings['totalMembers'] , '
<br />'.$bullet.$txt['tp-latest']. ': <a href="', $scripturl, '?action=profile;u=', $modSettings['latestMember'], '"><b>', $modSettings['latestRealName'], '</b></a>';
if(isset($context['TPortal']['userbox']['stats_all']))
global $db_prefix,$modSettings;
$today = strtotime("24 hours ago");
date('j') == 1 ? $thismonth = $today : $thismonth = strtotime(date('F') . ' 1');
date('l') == 'Sunday' ? $thisweek = $today : $thisweek = strtotime('last Sunday');
date('M') == 'January' ? $thisyear = $thismonth : $thisyear = strtotime('January 1');
$query = db_query("SELECT
COUNT(dateRegistered > $thisyear OR NULL) as year,
COUNT(dateRegistered > $thismonth OR NULL) as month,
COUNT(dateRegistered > $thisweek OR NULL) as week,
COUNT(dateRegistered > $today OR NULL) as today
FROM {$db_prefix}members
WHERE is_activated = 1", __FILE__, __LINE__);
$row = mysql_fetch_assoc($query);
settype($row['today'], "integer");
settype($row['week'], "integer");
settype($row['month'], "integer");
echo '<br />',$bullet,'New This Month: ', $row['month'],'<br />';
echo $bullet,'New This Week: ', $row['week'],'<br />';
echo $bullet,'New Today: ', $row['today'];
// more stats
echo '
<hr /><img src="'.$settings['images_url'].'/icons/info.gif" style="margin: 0;" align="bottom" alt="" />
<a href="'.$scripturl.'?action=stats"><b>'.$txt['tp-stats'].'</b></a>
<br />'.$bullet.$txt[489].': '.$modSettings['totalMessages']. '
<br />'.$bullet. $txt[490].': '.$modSettings['totalTopics']. '
<br />'.$bullet.$txt['tp-mostonline-today'].': '.$modSettings['mostOnlineToday'].'
<br />'.$bullet.$txt['tp-mostonline'].': '.$modSettings['mostOnline'].'<br />
('.timeformat($modSettings['mostDate']).')
';
if(isset($context['TPortal']['userbox']['online'])){
// add online users
echo '<hr /><img src="'.$settings['images_url'].'/icons/online.gif" style="margin: 0;" align="bottom" alt="" />
<a href="'.$scripturl.'?action=who"><b>'.$txt[158].'</b></a><br />';
$online = ssi_whosOnline('array');
echo $bullet.$txt['tp-users'].': '.$online['num_users'];
echo '<br />'.$bullet.$txt['tp-guests'].': '.$online['guests'];
// --- Begin FlashChat Integration ---
echo '<br />', $bullet, 'In Chat: ', $online['num_chat'];
// --- End FlashChat Integration ---
echo '<br />'.$bullet.$txt['tp-total'].': '.$online['total_users'].'<hr />
<div style="width: 100%; ' , $online['num_users']>14 ? 'height: 23ex;overflow: auto;' : '' ,'">';
foreach($online['users'] as $user){
echo $bullet2 , $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'];
echo '<br />';
}
echo '</div>';
}
echo '</div>';
// add arcade users
echo '<div class="smalltext" style="font-family: verdana, arial, sans-serif;">
<hr />
<img src="/arcade.png"><a href="'.$scripturl.'?action=arcade"><b> Users in Arcade</b></a><br />';
//added code
echo' <div style="width: 100%; ' , $online['num_users']>14 ? 'height: 23ex;overflow: auto;' : '' ,'">';
// Its ok now bullits have flown by stand up again lol
$online = ssi_whosOnline('array');
$arcade_users = array();
foreach($online['users'] as $user)
{
$result = db_query("
SELECT url
FROM {$db_prefix}log_online
WHERE ID_MEMBER = $user[id]",__FILE__, __LINE__);
$checkit = mysql_fetch_assoc($result);
$data = @unserialize($checkit['url']);
if($data['action']=='arcade')
{
echo $bullet2 , $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link']; echo '<br />';
$arcade_users[] = $user;
}
unset($data);
}
// No arcade users?
if(empty($arcade_users))
echo '<br />No members in the arcade';
// end wdmboard_statsonline
echo'</div>
</div>
</div>';
Thanks to making this code possible goes out to:
Bloc (http://www.tinyportal.co.uk) - Overall stats template from old versions of TP
JPDeni (http://www.morethanspike.com/) - New members section
Daniel15 (http://www.daniel15.com/forum/index.php) - FlashChat users
WDM2005 (http://sleepy-arcade.ath.cx/dev/) - Arcade users
QuoteTable 'eas0825602315011.members' doesn't exist
File: /home/content/b/u/c/buc240/html/eastcoastastro/forums/Sources/SPortal1-1.php(1646) : eval()'d code
Line: 32
global $context, $settings, $options, $scripturl, $txt, $user_info, $modSettings;
global $context, $settings, $options, $scripturl, $txt, $user_info, $modSettings, $db_prefix;
echo '</div>';
}
echo '</div>
</div>'; }
echo '</div>
</div>';
global $context, $settings, $options, $scripturl, $txt, $user_info, $modSettings;
$bullet = '<img src="'.$settings['images_url'].'/TPdivider.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet2 = '<img src="'.$settings['images_url'].'/TPdivider2.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet3 = '<img src="'.$settings['images_url'].'/TPdivider3.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet4 = '<img src="'.$settings['images_url'].'/tpgoto.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet5 = '<img src="'.$settings['images_url'].'/tpmodule2.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
echo'
<div class="smalltext" style="font-family: verdana, arial, sans-serif;">';
if(isset($context['TPortal']['userbox']['stats']))
// members stats
echo '
<img src="'.$settings['images_url'].'/icons/members.gif" style="margin: 0;" align="bottom" alt="" />
<a href="'.$scripturl.'?action=mlist"><b>'.$txt[19].'</b></a>
<br />'.$bullet.$txt[488].': ' , isset($modSettings['memberCount']) ? $modSettings['memberCount'] : $modSettings['totalMembers'] , '
<br />'.$bullet.$txt['tp-latest']. ': <a href="', $scripturl, '?action=profile;u=', $modSettings['latestMember'], '"><b>', $modSettings['latestRealName'], '</b></a>';
if(isset($context['TPortal']['userbox']['stats_all']))
global $db_prefix,$modSettings;
$today = strtotime("24 hours ago");
date('j') == 1 ? $thismonth = $today : $thismonth = strtotime(date('F') . ' 1');
date('l') == 'Sunday' ? $thisweek = $today : $thisweek = strtotime('last Sunday');
date('M') == 'January' ? $thisyear = $thismonth : $thisyear = strtotime('January 1');
$query = db_query("SELECT
COUNT(dateRegistered > $thisyear OR NULL) as year,
COUNT(dateRegistered > $thismonth OR NULL) as month,
COUNT(dateRegistered > $thisweek OR NULL) as week,
COUNT(dateRegistered > $today OR NULL) as today
FROM {$db_prefix}members
WHERE is_activated = 1", __FILE__, __LINE__);
$row = mysql_fetch_assoc($query);
settype($row['today'], "integer");
settype($row['week'], "integer");
settype($row['month'], "integer");
echo '<br />',$bullet,'New This Month: ', $row['month'],'<br />';
echo $bullet,'New This Week: ', $row['week'],'<br />';
echo $bullet,'New Today: ', $row['today'];
// more stats
echo '
<hr /><img src="'.$settings['images_url'].'/icons/info.gif" style="margin: 0;" align="bottom" alt="" />
<a href="'.$scripturl.'?action=stats"><b>'.$txt['tp-stats'].'</b></a>
<br />'.$bullet.$txt[489].': '.$modSettings['totalMessages']. '
<br />'.$bullet. $txt[490].': '.$modSettings['totalTopics']. '
<br />'.$bullet.$txt['tp-mostonline-today'].': '.$modSettings['mostOnlineToday'].'
<br />'.$bullet.$txt['tp-mostonline'].': '.$modSettings['mostOnline'].'<br />
('.timeformat($modSettings['mostDate']).')
';
if(isset($context['TPortal']['userbox']['online'])){
// add online users
echo '<hr /><img src="'.$settings['images_url'].'/icons/online.gif" style="margin: 0;" align="bottom" alt="" />
<a href="'.$scripturl.'?action=who"><b>'.$txt[158].'</b></a><br />';
$online = ssi_whosOnline('array');
echo $bullet.$txt['tp-users'].': '.$online['num_users'];
echo '<br />'.$bullet.$txt['tp-guests'].': '.$online['guests'];
// --- Begin FlashChat Integration ---
echo '<br />',$bullet.$txt['tp-total'].': '.$online['total_users'].'<hr />
<div style="width: 98%; ' , $online['num_users']>14 ? 'height: 23ex;overflow: auto;' : '' ,'">';
foreach($online['users'] as $user){
echo $bullet2 , $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'];
echo '<br />';
}
echo '</div>';
}
echo '</div>';
// add arcade users
echo '<div class="smalltext" style="font-family: verdana, arial, sans-serif;">
<hr />
<img src="/arcade.png"><a href="'.$scripturl.'?action=arcade"><b> Users in Arcade</b></a><br />';
//added code
echo' <div style="width: 98%; ' , $online['num_users']>14 ? 'height: 23ex;overflow: auto;' : '' ,'">';
// Its ok now bullits have flown by stand up again lol
$online = ssi_whosOnline('array');
$arcade_users = array();
foreach($online['users'] as $user)
{
$result = db_query("
SELECT url
FROM {$db_prefix}log_online
WHERE ID_MEMBER = $user[id]",__FILE__, __LINE__);
$checkit = mysql_fetch_assoc($result);
$data = @unserialize($checkit['url']);
if($data['action']=='arcade')
{
echo $bullet2 , $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link']; echo '<br />';
$arcade_users[] = $user;
}
unset($data);
}
// No arcade users?
if(empty($arcade_users))
echo '<br />No members in the arcade';
// end wdmboard_statsonline
echo'</div>
</div>
</div>';
echo '<br />';
}
echo '</div>';
}
echo '</div>';
Quote from: IchBinâ„¢ on March 12, 2009, 03:15:08 PM
Try removing the very last </div> and see if that helps. If not, I don't know what to tell you. This code looks a little messed up anyway.
global $context, $settings, $options, $scripturl, $txt, $user_info, $modSettings;
$bullet = '<img src="'.$settings['images_url'].'/TPdivider.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet2 = '<img src="'.$settings['images_url'].'/TPdivider2.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet3 = '<img src="'.$settings['images_url'].'/TPdivider3.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet4 = '<img src="'.$settings['images_url'].'/tpgoto.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet5 = '<img src="'.$settings['images_url'].'/tpmodule2.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
echo'
<div class="smalltext" style="font-family: verdana, arial, sans-serif;">';
if(isset($context['TPortal']['userbox']['stats']))
// members stats
echo '
<img src="'.$settings['images_url'].'/icons/members.gif" style="margin: 0;" align="bottom" alt="" />
<a href="'.$scripturl.'?action=mlist"><b>'.$txt[19].'</b></a>
<br />'.$bullet.$txt[488].': ' , isset($modSettings['memberCount']) ? $modSettings['memberCount'] : $modSettings['totalMembers'] , '
<br />'.$bullet.$txt['tp-latest']. ': <a href="', $scripturl, '?action=profile;u=', $modSettings['latestMember'], '"><b>', $modSettings['latestRealName'], '</b></a>';
if(isset($context['TPortal']['userbox']['stats_all']))
global $db_prefix,$modSettings;
$today = strtotime("24 hours ago");
date('j') == 1 ? $thismonth = $today : $thismonth = strtotime(date('F') . ' 1');
date('l') == 'Sunday' ? $thisweek = $today : $thisweek = strtotime('last Sunday');
date('M') == 'January' ? $thisyear = $thismonth : $thisyear = strtotime('January 1');
$query = db_query("SELECT
COUNT(dateRegistered > $thisyear OR NULL) as year,
COUNT(dateRegistered > $thismonth OR NULL) as month,
COUNT(dateRegistered > $thisweek OR NULL) as week,
COUNT(dateRegistered > $today OR NULL) as today
FROM {$db_prefix}members
WHERE is_activated = 1", __FILE__, __LINE__);
$row = mysql_fetch_assoc($query);
settype($row['today'], "integer");
settype($row['week'], "integer");
settype($row['month'], "integer");
echo '<br />',$bullet,'New This Month: ', $row['month'],'<br />';
echo $bullet,'New This Week: ', $row['week'],'<br />';
echo $bullet,'New Today: ', $row['today'];
// more stats
echo '
<hr /><img src="'.$settings['images_url'].'/icons/info.gif" style="margin: 0;" align="bottom" alt="" />
<a href="'.$scripturl.'?action=stats"><b>'.$txt['tp-stats'].'</b></a>
<br />'.$bullet.$txt[489].': '.$modSettings['totalMessages']. '
<br />'.$bullet. $txt[490].': '.$modSettings['totalTopics']. '
<br />'.$bullet.$txt['tp-mostonline-today'].': '.$modSettings['mostOnlineToday'].'
<br />'.$bullet.$txt['tp-mostonline'].': '.$modSettings['mostOnline'].'<br />
('.timeformat($modSettings['mostDate']).')
';
if(isset($context['TPortal']['userbox']['online'])){
// add online users
echo '<hr /><img src="'.$settings['images_url'].'/icons/online.gif" style="margin: 0;" align="bottom" alt="" />
<a href="'.$scripturl.'?action=who"><b>'.$txt[158].'</b></a><br />';
$online = ssi_whosOnline('array');
echo $bullet.$txt['tp-users'].': '.$online['num_users'];
echo '<br />'.$bullet.$txt['tp-guests'].': '.$online['guests'];
echo '<br />'.$bullet.$txt['tp-total'].': '.$online['total_users'].'<hr />
<div style="width: 100%; ' , $online['num_users']>14 ? 'height: 23ex;overflow: auto;' : '' ,'">';
foreach($online['users'] as $user){
echo $bullet2 , $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'];
echo '<br />';
}
echo '</div>';
}
echo '</div>';
// add arcade users
echo '<div class="smalltext" style="font-family: verdana, arial, sans-serif;">
<hr />
<img src="/arcade.png"><a href="'.$scripturl.'?action=arcade"><b> Users in Arcade</b></a><br />';
//added code
echo' <div style="width: 100%; ' , $online['num_users']>14 ? 'height: 23ex;overflow: auto;' : '' ,'">';
// Its ok now bullits have flown by stand up again lol
$online = ssi_whosOnline('array');
$arcade_users = array();
foreach($online['users'] as $user)
{
$result = db_query("
SELECT url
FROM {$db_prefix}log_online
WHERE ID_MEMBER = $user[id]",__FILE__, __LINE__);
$checkit = mysql_fetch_assoc($result);
$data = @unserialize($checkit['url']);
if($data['action']=='arcade')
{
echo $bullet2 , $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link']; echo '<br />';
$arcade_users[] = $user;
}
unset($data);
}
// No arcade users?
if(empty($arcade_users))
echo '<br />No members in the arcade';
// end wdmboard_statsonline
echo'</div>
</div>';
if($data['action']=='arcade')
if ((isset($data['action']) && ($data['action']=='arcade'))
Quote
Parse error: syntax error, unexpected '{' in /home/xxxxxxxx/public_html/forum/Sources/Load.php(1756) : eval()'d code(35) : eval()'d code on line 97
QuoteTaking out one of the two = out of the line Itchbin posted does seem to have fixed it though. Wink Is it ok to leave it like this?You won't get the error, but the code won't work right, so it would probably be better just to take out that section of code, if you don't care whether it works or not.
Quote from: JPDeni on March 18, 2009, 09:29:43 PMQuoteTaking out one of the two = out of the line Itchbin posted does seem to have fixed it though. Wink Is it ok to leave it like this?You won't get the error, but the code won't work right, so it would probably be better just to take out that section of code, if you don't care whether it works or not.
If you do care whether it works or not, like IchBin said, post your code that gives a problem and we'll debug it.
global $context, $settings, $options, $scripturl, $txt, $user_info, $modSettings;
$bullet = '<img src="'.$settings['images_url'].'/TPdivider.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet2 = '<img src="'.$settings['images_url'].'/TPdivider2.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet3 = '<img src="'.$settings['images_url'].'/TPdivider3.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet4 = '<img src="'.$settings['images_url'].'/tpgoto.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet5 = '<img src="'.$settings['images_url'].'/tpmodule2.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
echo'
<div class="smalltext" style="font-family: verdana, arial, sans-serif;">';
if(isset($context['TPortal']['userbox']['stats']))
// members stats
echo '
<img src="'.$settings['images_url'].'/icons/members.gif" style="margin: 0;" align="bottom" alt="" />
<a href="'.$scripturl.'?action=mlist"><b>'.$txt[19].'</b></a>
<br />'.$bullet.$txt[488].': ' , isset($modSettings['memberCount']) ? $modSettings['memberCount'] : $modSettings['totalMembers'] , '
<br />'.$bullet.$txt['tp-latest']. ': <a href="', $scripturl, '?action=profile;u=', $modSettings['latestMember'], '"><b>', $modSettings['latestRealName'], '</b></a>';
if(isset($context['TPortal']['userbox']['stats_all']))
global $db_prefix,$modSettings;
$today = strtotime("24 hours ago");
date('j') == 1 ? $thismonth = $today : $thismonth = strtotime(date('F') . ' 1');
date('l') == 'Sunday' ? $thisweek = $today : $thisweek = strtotime('last Sunday');
date('M') == 'January' ? $thisyear = $thismonth : $thisyear = strtotime('January 1');
$query = db_query("SELECT
COUNT(dateRegistered > $thisyear OR NULL) as year,
COUNT(dateRegistered > $thismonth OR NULL) as month,
COUNT(dateRegistered > $thisweek OR NULL) as week,
COUNT(dateRegistered > $today OR NULL) as today
FROM {$db_prefix}members
WHERE is_activated = 1", __FILE__, __LINE__);
$row = mysql_fetch_assoc($query);
settype($row['today'], "integer");
settype($row['week'], "integer");
settype($row['month'], "integer");
echo '<br />',$bullet,'New This Month: ', $row['month'],'<br />';
echo $bullet,'New This Week: ', $row['week'],'<br />';
echo $bullet,'New Today: ', $row['today'];
// more stats
echo '
<hr /><img src="'.$settings['images_url'].'/icons/info.gif" style="margin: 0;" align="bottom" alt="" />
<a href="'.$scripturl.'?action=stats"><b>'.$txt['tp-stats'].'</b></a>
<br />'.$bullet.$txt[489].': '.$modSettings['totalMessages']. '
<br />'.$bullet. $txt[490].': '.$modSettings['totalTopics']. '
<br />'.$bullet.$txt['tp-mostonline-today'].': '.$modSettings['mostOnlineToday'].'
<br />'.$bullet.$txt['tp-mostonline'].': '.$modSettings['mostOnline'].'<br />
('.timeformat($modSettings['mostDate']).')
';
if(isset($context['TPortal']['userbox']['online'])){
// add online users
echo '<hr /><img src="'.$settings['images_url'].'/icons/online.gif" style="margin: 0;" align="bottom" alt="" />
<a href="'.$scripturl.'?action=who"><b>'.$txt[158].'</b></a><br />';
$online = ssi_whosOnline('array');
echo $bullet.$txt['tp-users'].': '.$online['num_users'];
echo '<br />'.$bullet.$txt['tp-guests'].': '.$online['guests'];
echo '<br />'.$bullet.$txt['tp-total'].': '.$online['total_users'].'<hr />
<div style="width: 100%; ' , $online['num_users']>14 ? 'height: 23ex;overflow: auto;' : '' ,'">';
foreach($online['users'] as $user){
echo $bullet2 , $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'];
echo '<br />';
}
echo '</div>';
}
echo '</div>';
// add arcade users
echo '<div class="smalltext" style="font-family: verdana, arial, sans-serif;">
<hr />
<img src="/arcade.png"><a href="'.$scripturl.'?action=arcade"><b> Users in Arcade</b></a><br />';
//added code
echo' <div style="width: 100%; ' , $online['num_users']>14 ? 'height: 23ex;overflow: auto;' : '' ,'">';
// Its ok now bullits have flown by stand up again lol
$online = ssi_whosOnline('array');
$arcade_users = array();
foreach($online['users'] as $user)
{
$result = db_query("
SELECT url
FROM {$db_prefix}log_online
WHERE ID_MEMBER = $user[id]",__FILE__, __LINE__);
$checkit = mysql_fetch_assoc($result);
$data = @unserialize($checkit['url']);
if ((isset($data['action']) && ($data['action']=='arcade'))
{
echo $bullet2 , $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link']; echo '<br />';
$arcade_users[] = $user;
}
unset($data);
}
// No arcade users?
if(empty($arcade_users))
echo '<br />No members in the arcade';
// end wdmboard_statsonline
echo'</div>
</div>';
global $context, $settings, $options, $scripturl, $txt, $user_info, $modSettings;
$bullet = '<img src="'.$settings['images_url'].'/TPdivider.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet2 = '<img src="'.$settings['images_url'].'/TPdivider2.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet3 = '<img src="'.$settings['images_url'].'/TPdivider3.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet4 = '<img src="'.$settings['images_url'].'/tpgoto.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet5 = '<img src="'.$settings['images_url'].'/tpmodule2.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
echo'
<div class="smalltext" style="font-family: verdana, arial, sans-serif;">';
if(isset($context['TPortal']['userbox']['stats']))
// members stats
echo '
<img src="'.$settings['images_url'].'/icons/members.gif" style="margin: 0;" align="bottom" alt="" />
<a href="'.$scripturl.'?action=mlist"><b>'.$txt[19].'</b></a>
<br />'.$bullet.$txt[488].': ' , isset($modSettings['memberCount']) ? $modSettings['memberCount'] : $modSettings['totalMembers'] , '
<br />'.$bullet.$txt['tp-latest']. ': <a href="', $scripturl, '?action=profile;u=', $modSettings['latestMember'], '"><b>', $modSettings['latestRealName'], '</b></a>';
if(isset($context['TPortal']['userbox']['stats_all']))
global $db_prefix,$modSettings;
$today = strtotime("24 hours ago");
date('j') == 1 ? $thismonth = $today : $thismonth = strtotime(date('F') . ' 1');
date('l') == 'Sunday' ? $thisweek = $today : $thisweek = strtotime('last Sunday');
date('M') == 'January' ? $thisyear = $thismonth : $thisyear = strtotime('January 1');
$query = db_query("SELECT
COUNT(dateRegistered > $thisyear OR NULL) as year,
COUNT(dateRegistered > $thismonth OR NULL) as month,
COUNT(dateRegistered > $thisweek OR NULL) as week,
COUNT(dateRegistered > $today OR NULL) as today
FROM {$db_prefix}members
WHERE is_activated = 1", __FILE__, __LINE__);
$row = mysql_fetch_assoc($query);
settype($row['today'], "integer");
settype($row['week'], "integer");
settype($row['month'], "integer");
echo '<br />',$bullet,'New This Month: ', $row['month'],'<br />';
echo $bullet,'New This Week: ', $row['week'],'<br />';
echo $bullet,'New Today: ', $row['today'];
// more stats
echo '
<hr /><img src="'.$settings['images_url'].'/icons/info.gif" style="margin: 0;" align="bottom" alt="" />
<a href="'.$scripturl.'?action=stats"><b>'.$txt['tp-stats'].'</b></a>
<br />'.$bullet.$txt[489].': '.$modSettings['totalMessages']. '
<br />'.$bullet. $txt[490].': '.$modSettings['totalTopics']. '
<br />'.$bullet.$txt['tp-mostonline-today'].': '.$modSettings['mostOnlineToday'].'
<br />'.$bullet.$txt['tp-mostonline'].': '.$modSettings['mostOnline'].'<br />
('.timeformat($modSettings['mostDate']).')
';
if(isset($context['TPortal']['userbox']['online'])){
// add online users
echo '<hr /><img src="'.$settings['images_url'].'/icons/online.gif" style="margin: 0;" align="bottom" alt="" />
<a href="'.$scripturl.'?action=who"><b>'.$txt[158].'</b></a><br />';
$online = ssi_whosOnline('array');
echo $bullet.$txt['tp-users'].': '.$online['num_users'];
echo '<br />'.$bullet.$txt['tp-guests'].': '.$online['guests'];
echo '<br />'.$bullet.$txt['tp-total'].': '.$online['total_users'].'<hr />
<div style="width: 100%; ' , $online['num_users']>14 ? 'height: 23ex;overflow: auto;' : '' ,'">';
foreach($online['users'] as $user){
echo $bullet2 , $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'];
echo '<br />';
}
echo '</div>';
}
echo '</div>';
// add arcade users
echo '<div class="smalltext" style="font-family: verdana, arial, sans-serif;">
<hr />
<img src="/arcade.png"><a href="'.$scripturl.'?action=arcade"><b> Users in Arcade</b></a><br />';
//added code
echo' <div style="width: 100%; ' , $online['num_users']>14 ? 'height: 23ex;overflow: auto;' : '' ,'">';
// Its ok now bullits have flown by stand up again lol
$online = ssi_whosOnline('array');
$arcade_users = array();
foreach($online['users'] as $user)
{
$result = db_query("
SELECT url
FROM {$db_prefix}log_online
WHERE ID_MEMBER = $user[id]",__FILE__, __LINE__);
$checkit = mysql_fetch_assoc($result);
$data = @unserialize($checkit['url']);
if (isset($data['action']) && ($data['action']=='arcade'))
{
echo $bullet2 , $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link']; echo '<br />';
$arcade_users[] = $user;
}
unset($data);
}
// No arcade users?
if(empty($arcade_users))
echo '<br />No members in the arcade';
// end wdmboard_statsonline
echo'</div>
</div>';
Quote from: ZarPrime on April 19, 2009, 05:45:03 PM
lurkalot,
Hang around for awhile and be patient. Perhaps Lord Anubis will see this and be able to add something to the code for you to be able to do this since he wrote the original code.
ZarPrime
Quote from: lurkalot on April 22, 2009, 07:52:07 AM
Thanks. I did ask a similar question directly on Lord Anubis's site a year ago, think he was stumped then. lol...
Quote from: Lord Anubis on April 23, 2009, 03:40:18 PMQuote from: lurkalot on April 22, 2009, 07:52:07 AM
Thanks. I did ask a similar question directly on Lord Anubis's site a year ago, think he was stumped then. lol...
Correct, I never used Coppermine so have no idea how incorporate this ???