Flu Pandemic Level



WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND b.name = 'Bug' AND a.category_id = b.id AND a.status <> 90 ORDER BY a.id' at line 1]
SELECT a.id AS 'ID', summary AS 'Description' FROM mantis_bug_table a, mantis_category_table b WHERE a.project_id = AND b.name = 'Bug' AND a.category_id = b.id AND a.status <> 90 ORDER BY a.id

WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND (b.name = 'Enhancement' OR b.name = 'Maintenance') AND a.category_id = b.id ' at line 1]
SELECT a.id AS 'ID', summary AS 'Description' FROM mantis_bug_table a, mantis_category_table b WHERE a.project_id = AND (b.name = 'Enhancement' OR b.name = 'Maintenance') AND a.category_id = b.id AND a.status <> 90 ORDER BY a.id

Flu Pandemic Level is a WordPress plugin that will fetch the current WHO (World Health Organisation) phase of pandemic alert.

Description

From version 1.2 a cache system is used - please read the installation notes for ensuring that the new caching facility correctly works

This plugin reads the WHO (World Health Organisation) website and fetch the current phase of pandemic alert. You can also find full descriptions for the phases on this site. The phase is a number between 1 and 6.

The phase is not displayed, but is returned by the plugin. So, to display the phase you might code…

<?php echo flu_pandemic_level(); ?>

Alternatively, you can simply use the plugin to return the phase for use in some further code.

The following is an example of how it could be used, with a function_exists check so that it doesn’t cause problems if the plugin is not active…

<?php if (function_exists('flu_pandemic_level')) : ?>
<?php echo flu_pandemic_level(); ?>
<?php endif; ?>

From version 1.2, you can (optionally) pass a parameter of cache= followed by a number. This represents the number of hours that a cache should be retained. If this is set to "NO" then caching will be turned off. For example...

<?php echo flu_pandemic_level('cache=6'); ?>

Also from version 1.2 onwards, you can request the pandemic level to be listed "inline", from within your post/page. Simply place the tag [FLU] within your post/page and it will be replaced by the current flu level number.

For help with this plugin, or simply to comment or get in touch, please read the appropriate section in "Other Notes" for details. This plugin, and all support, is supplied for free, but donations are always welcome.

Licence

This WordPRess plugin is licensed under the GPLv2 (or later).

Support

All of my plugins are supported via my website.

Please feel free to visit the site for plugin updates and development news - either visit the site regularly, follow my news feed or follow me on Twitter (@artiss_tech).

For problems, suggestions or enhancements for this plugin, there is a dedicated page and a forum. The dedicated page will also list any known issues and planned enhancements.

Alternatively, please contact me directly.

This plugin, and all support, is supplied for free, but donations are always welcome.

Installation

  1. Upload the entire flu-pandemic-level folder to your wp-content/plugins/ directory.
  2. Ensure the cache folder within the plugins folder is fully writable - ie. change its permissions to 777.
  3. Activate the plugin through the 'Plugins' menu in WordPress.
  4. There is no options screen - configuration is done in your code.

Frequently Asked Questions

Which version of PHP does this plugin work with?

It has been tested and been found valid from PHP 4 upwards.

Changelog

1.0

  • Initial release

1.1

  • Tidied up code
  • Re-tested to ensure that level extraction still works

1.2

  • Flu level is now cached - by default for 24 hours
  • New cache tag added so that default cache time can be changed
  • Added new inline tag that can be used within posts and pages to display the flu level
  • New function added to output error messages

1.3

  • Wording on WHO site had changed so this plugin has stopped working - corrected
  • Updated some of the routines and improved error checking

1.3.1

  • Fixed file fetching bug

Mantis Bug Tracker

Known Bugs

No bugs are currently recorded.

Planned Enhancements

No enhancements are currently planned.

Delicious Digg Facebook LinkedIn Read It Later reddit StumbleUpon Twitter SeparatorEmail Google Translate PDF Online Print Friendly

Support Forum

Please use the forum for reporting any problems, queries or suggestions relating to this plugin.

3 Comments - ARCHIVE

  1. SecoL says:

    Hey great plugin its very usefull but the line “The current WHO phase of pandemic alert is” was changed to “The current WHO phase of pandemic alert for avian influenza is”
    and need to be updated on the code or you get an error =)

  2. SecoL says:

    The WHO site change again the text to “The current WHO phase of pandemic alert for avian influenza H5N1 is ” but i change the quoted line and got this “Flu Pandemic Level: The WHO page is not in the expected format.”

1 Pingback/Trackback

  1. Adding H1N1 and Twitter Pandemic Flu search to Your Sidebar or Blog | H1N1 - H5N1 flu virus forecast blog wrote:

    [...] will fetch the current WHO (World Health Organisation) phase of pandemic alert. You can view the plugin homepage and then install it directly from the WordPress [...]