Friends of the York Spring Festival of New Music
This year the Spring Festival is inviting its supporters to become Friends of the Festival. This opportunity gives you a chance both to take advantage of friends-only offers and opportunities, and to support the festival in its aim of bringing the best new music to the area. As a Friend, enjoy:
- Free CD from El Perro Andaluz
- Invitation to Festival Launch
- Free Festival Programme (otherwise £2)
- Free ticket for a friend for two events (excluding Roller Trio)
- 20% off all tickets
- Membership covers 2012 and 2013 festivals
- Acknowledgement of support in programme & on website
Become a Friend for only £20, with a £30 rate for joint membership (two people at the same address) and £50 for Corporate Friends.
For full information download the Friends of YSFNM membership form. For more information on Gift Aid donations, please visit http://www.yorkspace.net/giftaid.
Latest from Twitter
-
/* twitter-rss-to-html.php
Twitter-RSS-to-HTML for PHP by Rogers Cadenhead
Version 1.1
Web: http://www.cadenhead.org/workbench/twitter-rss-to-html
Copyright (C) 2008 Rogers Cadenhead
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
// a PHP script to display Twitter updates from a user's RSS feed on a web page
require_once("magpierss/rss_fetch.inc");
define('MAGPIE_INPUT_ENCODING', 'UTF-8');
define('MAGPIE_OUTPUT_ENCODING', 'UTF-8');
// set up script variables
// the user's RSS feed on Twitter
$remote_url = "http://twitter.com/statuses/user_timeline/ysfnm.rss";
// the number of tweets to display (or -1 to display all)
$tweets_to_display = 4;
// the page where the tweet(s) will be displayed
$page = "http://www.yorkspingfestival.co.uk/";
// the user's Twitter username
$username = "YSFNM";
$rss = fetch_rss($remote_url);
// start buffering output
ob_start();
$count = 1;
$now = time();
foreach ($rss->items as $item) {
// limit the number of tweets displayed
if ($tweets_to_display > 0) {
if ($count > $tweets_to_display) {
continue;
}
}
$tweet = $item['description'];
$link = $item['link'];
// ignore tweets linking back to page (if it is defined)
if ($page != "") {
if (!strpos($tweet, $page) === false) {
continue;
}
}
// figure out how recently the tweet was posted
$when = ($now - strtotime($item['pubdate']));
$posted = "";
if ($when < 60) {
$posted = $when . " seconds ago";
}
if (($posted == "") & ($when < 3600)) {
$posted = "about " . (floor($when / 60)) . " minutes ago";
}
if (($posted == "") & ($when < 7200)) {
$posted = "about 1 hour ago";
}
if (($posted == "") & ($when < 86400)) {
$posted = "about " . (floor($when / 3600)) . " hours ago";
}
if (($posted == "") & ($when < 172800)) {
$posted = "about 1 day ago";
}
if ($posted == "") {
$posted = (floor($when / 86400)) . " days ago";
}
// filter the user's username out of tweets
$tweet = str_replace($username . ": ", "", $tweet);
// turn URLs into hyperlinks
$tweet = preg_replace("/(http:\/\/)(.*?)\/([\w\.\/\&\=\?\-\,\:\;\#\_\~\%\+]*)/", "\\0", $tweet);
// link to users in replies
$tweet = preg_replace("(@([a-zA-Z0-9\_]+))", "\\0", $tweet);
// add the time posted
$tweet = $tweet . " " . $posted . " →";
echo ("\n\n
- " . $tweet ." "); $count++; } // display output ob_end_flush(); ?>

