';
}
//function to write a link to the meta widget
function pmcWriteMetaLink() {
//get the settings from the database
$pmcTwitterID = get_option('pmcTwitterID');
//build the link
echo '
';
echo '
Add Twitter RSS
';
echo '
Find My Twitter ID
';
echo '
';
echo '
';
echo '
Settings
';
echo '
';
echo '
Settings
';
echo '
';
echo 'RSS Icon Text: What a visitor will see when they click your RSS Icon in their browsers address bar. Automatically preceeded by "Subscribe to".';
echo '
';
echo 'Your Twitter ID: Twitter uses a numeric ID for each user. If you know your Twitter ID, type it in here, otherwise use the "Find My Twitter ID" utility above.';
echo '
';
echo '
';
}
//function to check if we should process the form
function pmcCheckProcess() {
//check the $_POST variable
if (array_key_exists('process-form', $_POST)) {
//save the Twitter Screen Name
if (get_option('pmcTwitterScreen') != '') {
update_option('pmcTwitterScreen', $_POST['pmcTwitterScreen']);
} else {
add_option('pmcTwitterScreen', $_POST['pmcTwitterScreen']);
}
//get Twitter ID
pmcGetTwitterID();
}
}
//function to get Twitter ID from Twitter username
function pmcGetTwitterID() {
//require class_http.php
require_once(dirname(__FILE__).'/class_http.php');
//create a new connection
$pmcTwitterConn = new http();
//get the Twitter username from post variable
$pmcTwitterUser = get_option('pmcTwitterScreen');
//set the url to the Twitter API
$pmcTwitterAPI = 'http://twitter.com/users/show/' . $pmcTwitterUser . '.xml';
//make sure that we can connect, if not display an error message
if (!$pmcTwitterConn->fetch($pmcTwitterAPI, "0", "twitter")) {
echo "