Welcome Guest ( Log In | Register )


> IPS Related Information

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 :

  1. Host & publish images
  2. Host and link Blogs
  3. Integrate all that to the Invision Power Board

 
Reply to this topicStart new topic
> IPS Tutorials: NickTheGreek's Blog - Scorpions (reunion) Developer Articles > Hidden Gems: IPSDebug::fireBug
RSS Bot
post 29 Jun 2009, 12:45 PM
Post #1


yourforum Robot
Group Icon

Group: Private Members
Posts: 196629
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
Go to the top of the page
 
Bookmark this: Post to Del.icio.usPost to DiggPost to FacebookPost to GooglePost to SlashdotPost to StumbleUponPost to TechnoratiPost to YahooMyWeb
+Quote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 12th July 2020 - 10:22 PM
Skin and Graphics by Dan Ellis and Anubis. Hosting by Forums & More 2005-2011.
InvisionGames - Your #1 Arcade Games Repository | AllSigs - Signatures for all | Rock Band + Guitar Hero = RockHero ! | The Remoters - Remote Assistance | FileMiners - You ask, We find