IPS Tutorials: NickTheGreek's Blog - Scorpions (reunion) Developer Articles > Hidden Gems: IPSDebug::fireBug |
|
|||||||||
This section is focused on Invision Power Services products...
IPS, widely praised for the continuous efforts aimed to a stable, fast and efficient board system has brought to us Invision Power Board, but not only that..
Invision Power Gallery & Invision Community Blog allow the forum members :
IPS Tutorials: NickTheGreek's Blog - Scorpions (reunion) Developer Articles > Hidden Gems: IPSDebug::fireBug |
29 Jun 2009, 12:45 PM
Post
#1
|
|
yourforum Robot Group: Private Members Posts: 196639 Joined: 12-July 05 From: RSS World Member No.: 125 |
Requirements:
FirePHP Firebug Firefox IPB 3.0 A little hidden gem in IPB3 is the FirePHP API. What this does is allow anyone with firebug and FirePHP pluggin installed in their browser to put errors and information straight to their firebug console. This offers endless advantages to users such as outputting information when posting data, getting information when redirects are in use and getting information from ajax requests. Before you can use this you must fire turn on IN_DEV mode in your config file, follow this article for information on how to accomplish this: Enabling developer mode After IN_DEV is enabled you will notice that IPB by default will start sending important information to your console. However surely you will want to add your own, to do this you simple need to call the FirePHP function which can be done via a static call from the IPSDebug class by simply doing: IPSDebug::fireBug( $method, $output ); This will then send a message to your firebug console. There are four types of messages you can send which will give different priorities in your firebug console, this can help you differentiate what type of errors they are. The four types of messages are: log, info, warn, error. These will look like this in your firebug console: [img]http://www.firephp.org/images/Screenshots/SimpleConsole.png[/img] To set the type of message you wish to output simple put the type in the $method parameter, e.g. IPSDebug::fireBug( 'info', 'this is my custom message' ); You will find that firebug is a very powerful addition to your development process and has some endless possibilities. Below is a screenshot outlining some of the possibilities: [img]https://addons.mozilla.org/en-US/firefox/images/p/21700/1213320522[/img] View the full article |
|
Lo-Fi Version | Time is now: 19th April 2024 - 05:06 AM |
Skin and Graphics by Dan Ellis and Anubis. Hosting by Forums & More © 2005-2011. |