<?php
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 * 
 * 
 */
if (isset($_REQUEST['tweet'])) {
    //$tweet = preg_replace('/\p{P}/u', '', $_REQUEST['tweet']);
    $tweet = preg_replace('/[^\wæøåäëöÆØÅÄËÖ]/', '', $_REQUEST['tweet']);
} else {
    $tweet = "tromsø";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>Twitter</title>
        <script src="http://widgets.twimg.com/j/2/widget.js"></script>
    </head>
    <body>
        <script>
            new TWTR.Widget({
                version: 2,
                type: 'search',
                search: '#<?php echo $tweet; ?>',
                interval: 6000,
                title: '<?php echo $tweet; ?>kvitter',
                subject: 'Bruk #<?php echo $tweet; ?> for &aring; komme p&aring; her',
                width: 'auto',
                height: 160,
                theme: {
                    shell: {
                        background: '#8ec1da',
                        color: '#ffffff'
                    },
                    tweets: {
                        background: '#ffffff',
                        color: '#444444',
                        links: '#1985b5'
                    }
                },
                features: {
                    scrollbar: true,
                    loop: false,
                    live: false,
                    hashtags: true,
                    timestamp: true,
                    avatars: true,
                    toptweets: true,
                    behavior: 'all'
                }
            }).render().start();
        </script>
    </body>
</html>