HTML and CSS Reference
In-Depth Information
// Loads Pusher
require_once SYS_PATH . '/lib/Pusher.php';
// Turns on error reporting if in debug mode
if (DEBUG===TRUE) {
ini_set('display_errors', 1);
error_reporting(E_ALL^E_STRICT);
} else {
ini_set('display_errors', 0);
error_reporting(0);
}
Loading Pusher's JavaScript API Wrapper
For the front-end portion of your realtime implementation, the app needs to include Pusher's JavaScript API wrapper.
In
system/inc/footer.inc.php
, add the following bold code:
</ul>
</footer>
<script src="
http://js.pusher.com/1.12/pusher.min.js"></script
>
</body>
</html>
Loading jQuery
For the effects, your app will need the jQuery library. Add it right after the Pusher JS in the footer:
</ul>
</footer>
<script src="
http://js.pusher.com/1.12/pusher.min.js"></script
>
<script src="
http://code.jquery.com/jquery-1.8.2.min.js"></script
>
</body>
</html>
Not
■
the code in this app has been tested only up to version 1.8.2 of jQuery. Newer versions may introduce issues
and should be used only after thorough testing.
Search WWH ::
Custom Search