Poom Posted June 6, 2004 Share Posted June 6, 2004 Hi Guys! I am trying to make a whos online infobox to work with BTS but I am having a few problems: The code I have is: <?php $boxHeading = BOX_HEADING_WHOS_ONLINE; $boxContent_attributes = ' align="center"'; $box_base_name = 'whosonline'; $boxContent = $xx_mins_ago = (time() - 900); tep_db_query("delete from " . TABLE_WHOS_ONLINE . " where time_last_click < '" . $xx_mins_ago . "'"); $whos_online_query = tep_db_query("select customer_id from " . TABLE_WHOS_ONLINE); while ($whos_online = tep_db_fetch_array($whos_online_query)) { if (!$whos_online['customer_id'] == 0) $n_members++; if ($whos_online['customer_id'] == 0) $n_guests++; $user_total = sprintf(tep_db_num_rows($whos_online_query)); } if ($user_total == 1) { $there_is_are = BOX_WHOS_ONLINE_THEREIS . ' '; } else { $there_is_are = BOX_WHOS_ONLINE_THEREARE . ' '; } if ($n_guests == 1) { $word_guest = ' ' . BOX_WHOS_ONLINE_GUEST; }else{ $word_guest = ' ' . BOX_WHOS_ONLINE_GUESTS; } if ($n_members == 1) { $word_member = ' ' . BOX_WHOS_ONLINE_MEMBER; }else{ $word_member = ' ' . BOX_WHOS_ONLINE_MEMBERS; } if (($n_guests >= 1) && ($n_members >= 1)) $word_and = ' ' . BOX_WHOS_ONLINE_AND . ' <br>'; $textstring = $there_is_are; if ($n_guests >= 1) $textstring .= $n_guests . $word_guest; $textstring .= $word_and; if ($n_members >= 1) $textstring .= $n_members . $word_member; $textstring .= ' online.'; $boxContent = array(); $boxContent[] = array('align' => 'left', 'text' => BOX_HEADING_WHOS_ONLINE ); $boxContent = array(); $boxContent[] = array('align' => 'left', 'text' => $textstring ); if(file_exists(DIR_WS_BOX_TEMPLATES . $box_base_name . '.tpl.php')) { require(DIR_WS_BOX_TEMPLATES . $box_base_name . '.tpl.php'); } else { require(DIR_WS_BOX_TEMPLATES . TEMPLATENAME_BOX); } ?> All the page does can be seen Here IT just says array :( How can I fix this? When I do new infoBox($info_box_contents); It works but inside a new box! (it still says array above though) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.