Drag the Report an Error bookmarklet to your toolbar Drag to toolbar!

Widget Implementation Guide

Embed MediaBug's widget in your site to let readers help you fix the news without leaving your site!  See an example of the widget in action here and here.

Simple Widget -  Widget triggered by custom link - Example

1. Include the widget Javascript file in the <head> of your page.

<script type="text/javascript" src="http://mediabugs.org/widget/widget.js"></script>

2. Add a link to your article tools to open the widget.  This link must include some basic details about the article.  Most of these details should be provided by your content management system.

<a href="#" onclick="reportMediaBug('article title','publication name','article author','pub date in YYYY-MM-DD format','URL to article permalink page');">Report an error</a>

For example,

<a href="#" onclick="reportMediaBug('Clowns on Parade','The Monkeypox Times','Chester Phillips','2010-04-12','http://themonkeypox.com/article/123456');">Report an error</a>

Widget with "File Bug" button - Widget triggered by floating tab - Example

1. Include the widget Javascript file in the <head> of your page.

<script type="text/javascript" src="http://mediabugs.org/widget/floating_widget.js"></script>

2. Create a <script> block in your article template and set the following variables:

<script type="text/javascript">

mediabugs_article_title ='Article Headline';

mediabugs_outlet = "Publication Title";

mediabugs_creator = "Author of this article";

mediabugs_article_date = '2010-02-15'; // must be in YYYY-MM-DD format

mediabugs_article_link = 'http://mynews.com/article/234234';


Note that if the article title and article link are not specified, the widget will use the current page's title and url.  We recommend the floating widget be used only on permalink pages as pages with multiple articles will not behave properly.

MediaBugs widget for Wordpress

First, add this single line to your header template between the <head> and </head> tags: 

<script type="text/javascript" src="http://mediabugs.org/widget/widget.js"></script>

Then you can place a "report an error" link anywhere you want in your templates (for instance, at the end of the single post template) by inserting the following code into a template (replace "BlogNameHere" with the name of your blog or site): 

<a href="#" onclick="return reportMediaBug('<?php echo the_title('','',false); ?>','BlogNameHere','<?php echo htmlspecialchars(get_the_author()); ?>','<?php the_date('Y-m-d'); ?>','<?php echo get_permalink(); ?>');">report an error</a>