JoshBowe Posted November 16, 2011 Share Posted November 16, 2011 Hi, I'm trying to make it so that it shows the amount of users that are currently viewing the catalog in a lot box underneath the Information box. So far I've added the following code to bm_information.php: $data = '<div class="ui-widget infoBoxContainer">' . '<div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_INFORMATION_BOX_TITLE . '</div>' . '<div class="ui-widget-content infoBoxContents">' . '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . MODULE_BOXES_INFORMATION_BOX_SHIPPING . '</a><br />' . '<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . MODULE_BOXES_INFORMATION_BOX_PRIVACY . '</a><br />' . '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . MODULE_BOXES_INFORMATION_BOX_CONDITIONS . '</a><br />' . '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . MODULE_BOXES_INFORMATION_BOX_CONTACT . '</a>' . '</div>' . '</div>' . '<div class="ui-widget infoBoxContainer">' . '<div class="ui-widget-header infoBoxHeading">' . 'User’s Online' . '</div>' . '<div class="ui-widget-content infoBoxContents">' . require('usersonline.php'); '</div>' . '</div>'; And the usersonline.php that's required contains the following code: <?php include_once ("usersOnline.class.php"); $visitors_online = new usersOnline(); if (count($visitors_online->error) == 0) { if ($visitors_online->count_users() == 1) { echo "There is " . $visitors_online->count_users() . " visitor online"; } else { echo "There are " . $visitors_online->count_users() . " visitors online"; } } else { echo "<b>Users online class errors:</b><br /><ul>\r\n"; for ($i = 0; $i < count($visitors_online->error); $i ++ ) { echo "<li>" . $visitors_online->error[$i] . "</li>\r\n"; } echo "</ul>\r\n"; } ?> Now it does work, however for some reason the user's online shows in very top left of the page rather in the box that I've made below the Information box. This also messes up the layout and everything that's supposed to be in the navigation bar on the right moves underneath the navigation bar on the left. Does anyone have any ideas? Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.