A Wordpress Greet Box
This WP plugin has been ported to Blogger and is called Blogger Greet Box. The good news is, this piece of code can be used with any HTML based website. So the Blogger Greet Box isn’t exactly a Blogger plugin, it’s a universal one.
The Blogger Greet Box
The Blogger Greet Box has the following features:
- Show a different greeting message to your visitor depending on the referrer URL.
- Beautiful set of icons.
- Greeting message can be inserted any where but better to use on the top.
- Shows a default greeting message if the user hits the URL directly or comes from a referrer which is not specified.
- Ability to remove the message when the user navigates within the same site so we do not keep nagging them with greeting messages.
- Currently the following referrers are installed.
- Google
- Yahoo
- Digg
- Stumbleupon
How to install the plugin
Download the following 2 Javascript files and upload to your server.1) http://cid-db9f90bab5f7f65e.skydrive.live.com/self.aspx/.Public/TextToBeDisplayedDiv.js
2) http://cid-db9f90bab5f7f65e.skydrive.live.com/self.aspx/.Public/HideShowDiv.js
Blogspot users can use any free hosting site available. There are plenty of them. Do not use GooglePages as they are shutting down from June 2009.
Copy the following code and paste it on your website/blogger template wherever you want the code to appear:
<script src="/TextToBeDisplayedDiv.js" type="text/javascript">
</script>
<div id="mainDisplayDiv" style="background:#F8F8FF;border:1px solid #B6AFA9;display:none">
<div id="dynamicContentDisplayed">
</div>
<script type="text/javascript">
// Give your feed url here
var feedURL = "YOUR BLOG FEED URL GOES HERE";
var dynamicHTMLText = displayRequiredText(feedURL);
document.getElementById("dynamicContentDisplayed").innerHTML
= dynamicHTMLText;
</script>
</div>
<script src="/HideShowDiv.js" type="text/javascript">
</script>
<script type="text/javascript">
//List your domains where you don't want to show up. Suppose
//when people navigate within your site and you don't want to
// show up. This is , separated
var myRestrictedDomainList = "YOUR DOMAIN NAME HERE";
showHideDiv(myRestrictedDomainList);
</script>
In the above code replace ‘/TextToBeDisplayedDiv.js’ and "/HideShowDiv.js” with the proper URL of these two Javascript files.</script>
<div id="mainDisplayDiv" style="background:#F8F8FF;border:1px solid #B6AFA9;display:none">
<div id="dynamicContentDisplayed">
</div>
<script type="text/javascript">
// Give your feed url here
var feedURL = "YOUR BLOG FEED URL GOES HERE";
var dynamicHTMLText = displayRequiredText(feedURL);
document.getElementById("dynamicContentDisplayed").innerHTML
= dynamicHTMLText;
</script>
</div>
<script src="/HideShowDiv.js" type="text/javascript">
</script>
<script type="text/javascript">
//List your domains where you don't want to show up. Suppose
//when people navigate within your site and you don't want to
// show up. This is , separated
var myRestrictedDomainList = "YOUR DOMAIN NAME HERE";
showHideDiv(myRestrictedDomainList);
</script>
Enter your blog’s feed URL and domain name (i.e. the root URL of your blog) at the indicated locations.
Now test the Greet Box by visiting your blog from Google/Yahoo/Digg and StumbleUpon.
[via Classic Tutorials]
Update: New plugin with more social media support is available
For updated version visit http://classictutorials.com/2009/11/21/greet-box-universal-blogger-v3-0/
ReplyDeleteI know anonymous
ReplyDeleteI've got one on my blog (http://tarunscreativespace.blogspot.com)