background preloader

PHP

Facebook Twitter

Kriswallsmith/assetic. Creating hooks for your Drupal modules | himerus. While I was working on the new Taxonomy Rockstar module, and building in the backend features, It was clear I needed to provide some sort of API for other developers who find it short a feature or two (layout generation in this situation) should be able to interact with some built in API functions in order to extend the module. This IS supposed to be a be all/end all module for Taxonomy by my own expectations. During my inital "what do I need to do here" planning phase, I ran across doing something that I haven't done before in a module, contributed or otherwise. So I had to do a little research on how to do this the "drupal way". It was apparent that I needed to use one of a handful of functions that appeared to deal with hooks, and invoking the functionality of other modules. The documentation on api.drupal.org gave the meanings for these functions, and the basic description, but didn't give me the best idea of how to really use them in my situation.

The Implementation need <? Conclusion. Scripts - ATOM/CAP advisory feed processors. NOAA ATOM/CAP Advisory PHP scripts This PHP script accesses and formats the Zone advisory ATOM/CAP XML feeds from www.weather.gov/alerts-beta/ to allow easy inclusion into your website. The ATOM/CAP feeds from NOAA include Advisory, Statement, Watch, and Warning type messages, but do not seem to include "Outlook" type statements (so no "Hazardous Weather Outlook" is available via the RSS feeds from weather.gov). The script has three optional arguments for the URL: zone=ssZnnn This allows override of the default Zone for the RSS feed to use. inc=Y If present, the script will not output surrounding HTML for the page returned. Summary=Y If present, the script will output only the titles and links for the alerts found.

There are two ways of including the script in your pages depending on whether your hoster has allow_url_include option set to on or off. URL method (old.. not recommended for PHP5): File method (recommended for PHP4 or PHP5+): NOAA ATOM/CAP Top Advisory Warning PHP script. pChart 2.0 - a PHP charting library.