Developers
Netvibes Mini Module API FAQ
While it might still work, we highly recommend to transition to the new Universal Widget API.
Updated: 04/07/2006
How can i ensure my module is always XML well formed?
And avoid XML parsing error …
- Be sure to use valid XHTML, close your tag.
- Be sure to encode your XML special characters. In PHP, this can be done with the htmlspecialchars function.
| ampersand | & | & |
| less-than sign | < | < |
| greater-than sign | > | > |
| quotation mark | ” | " |
| apostrophe | ' | ' |
- Validate your module against W3C HTML validator: http://validator.w3.org/
How can i ensure my module is always well utf-8 encoded?
- Be sure to save your file in utf-8 and not in iso-*, check the save parameters in your code editor.
- Encode strings that are not in utf-8. In PHP this can be done with the
utf8_encode()function. - If you see strings with lots of
?, you may need to encode them in utf-8. - If you see strings with charcaters like
é, you may have encoded strings that were already in utf-8.
How to emulate Netvibes XML Proxy on my web server?
And enable Ajax calls in standalone mode…
In PHP, a minimal proxy can be wrote like this one:
<?php header("Content-Type: text/xml"); if(substr($_GET['url'], 0, 7) == 'http://') { $handle = fopen($_GET['url'], "rb"); while (!feof($handle)) { echo fread($handle, 8192); } fclose($handle); } ?>
Then, you just have to add a line like this into your module:
if(!NV_XML_REQUEST_URL) { var NV_XML_REQUEST_URL = 'xmlProxy.php'; }
How can I play my own mp3 files in Netvibes' player?
You can make the podcast player play any of your mp3 file by calling the function PodcastPlayer.play. This function accepts two parameters: the file URL and a title. Here is a sample piece of code:
<a href="#" onclick="PodcastPlayer.play('http://www.exemple.com/podcast.mp3','My podcast');return false;">Listen podcast</a>
- Send to a friend
- Add to favorites
- Last modified: 2008/04/24 23:27

