"",
'sitemeter_code' => "",
);
}
// This is the function that outputs the Sitemeter code.
function widget_sitemeter($args) {
// $args is an array of strings that help widgets to conform to
// the active theme: before_widget, before_title, after_widget,
// and after_title are the array keys. Default tags: li and h2.
extract($args);
// Each widget can store and retrieve its own options.
// Here we retrieve any options that may have been set by the user
// relying on widget defaults to fill the gaps.
$options = array_merge(widget_sitemeter_options(), get_option('widget_sitemeter'));
unset($options[0]); //returned by get_option(), but we don't need it
// These lines generate our output. Widgets can be very complex
// but as you can see here, they can also be very, very simple.
echo $before_widget . $before_title . $options['Title'] . $after_title; ?>
<script type="text/javascript" src="http://.sitemeter.com/js/counter.js?site=">
$value)
if(array_key_exists('sitemeter-'.$key, $_POST))
$options[$key] = strip_tags(stripslashes($_POST['sitemeter-'.$key]));
// Save changes
update_option('widget_sitemeter', $options);
}
// Here is our little form segment. Notice that we don't need a
// complete form. This will be embedded into the existing form.
// Be sure you format your options to be valid HTML attributes
// before displayihng them on the page.
foreach($options as $key => $value): ?>
<label for="sitemeter-">: <input style="width: 200px;" id="sitemeter-" name="sitemeter-" type="text" value="" />
<? endforeach;
echo '';
}
// This registers our widget so it appears with the other available
// widgets and can be dragged and dropped into any active sidebars.
register_sidebar_widget('Sitemeter counter', 'widget_sitemeter');
// This registers our optional widget control form. Because of this
// our widget will have a button that reveals a 300x100 pixel form.
register_widget_control('Sitemeter counter', 'widget_sitemeter_control', 220, 50 * count(widget_sitemeter_options()));
}
// Run our code later in case this loads prior to any required plugins.
add_action('plugins_loaded', 'widget_sitemeter_init');
?>
11 comments
Comments feed for this article
September 6, 2008 at 1:26 pm
Stephanie O'Brian
“We love America, no doubt about that.” haha
Also, you just don’t mess with Oprah. She influences more Americans than any other celebrity. Good call.
September 6, 2008 at 3:26 pm
jkkuwitzky
As someone who is always trying to instigate domestic religious conflict, I would welcome a Christianists v Oprah conflict.
September 6, 2008 at 4:40 pm
Christopher L. Berry
“Chris Berry’s a funny guy. He’s really, really funny.”
Thanks David. Great interview
September 6, 2008 at 4:48 pm
David M. Manes
Ha. So now I’ve been outed as a Republican/Ron Paul supporter on ME’s blog, here, on Facebook, and on Downintheblog. Yikes…
September 6, 2008 at 4:50 pm
Stephanie O'Brian
Yikes is right… that is beyond scary Mr. Manes…
September 6, 2008 at 4:55 pm
Christopher L. Berry
I made a post about the Ron Paul video on TheChrisBerry.com a while back…I take full credit for this witch hunt.
September 7, 2008 at 9:47 pm
Rodney McCarthy
David
Thanks for the interview! Exciting times indeed. Thanks to all for visiting our site!
September 7, 2008 at 10:53 pm
Chris McNeal
David, and in chapel.
September 7, 2008 at 10:53 pm
Chris McNeal
And nice publicity for us David.
September 8, 2008 at 10:35 am
Christopher L. Berry
Nick Horton: Please stick to one name and email address on here. We do not moderate comments on here and you are free to say anything you like, but pretending to be three or four different people is not acceptable. I have edited the name and email address in your comment, but have left your comment exactly as you wrote it.
Thanks for your understanding of why it is necessary to troll under only one name.
September 8, 2008 at 2:18 pm
JH
You guys are way too nice. If someone is posting under multiple names, just ban them.