Showing posts with label blogger. Show all posts
Showing posts with label blogger. Show all posts

Thursday, November 6, 2008

Silverlight tag cloud for blogger

So finished the first workable version of the widget.

To insert into your blog use (under dashboard, layout, edit html, ensure that expand widget templates is checked).

Find the following:

<div id='sidebar-wrapper'>
<b:section class='sidebar' id='sidebar' preferred='yes'>

insert widget here


<b:widget id='Label2' locked='false' title='Dynamic Tag Cloud' type='Label'>
<b:includable id='main'>
<b:if cond='data:title'>
<h2><data:title/></h2>
</b:if>
<div class='widget-content' id='feCloud' style='text-align: center;'/>
<script src='http://www.figmentengine.com/tagCloud/feCloudv1.js' type='text/javascript'/>
<script type='text/javascript'>
var feCloudFeedAddress = 'http://feedproxy.google.com/FigmentEngine';
var feCloudNavigateFormat = 'http://blog.figmentengine.com/search/label/{0}';
var feCloudSize = 400;
feTagCloudLoad(feCloudFeedAddress, feCloudNavigateFormat, feCloudSize, feCloudSize);
</script>
</b:includable>
</b:widget>




changing
var feCloudFeedAddress = 'http://feedproxy.google.com/FigmentEngine';
to your feed address, note that I am using feedburner so I need to put my feedburner address here
and change
var feCloudNavigateFormat = 'http://blog.figmentengine.com/search/label/{0}';
to the url that pulls up all items that have a particular label, the widget will replace the "{0}" with the label name dynamically.
the size of the widget is controlled by:
var feCloudSize = 400;
which is the size in pixels.

common problems:

  • no labels appear - do your feed entries have labels - check the address of the feed and see what you get when you open it in your browser. Also check ensure you give the syndicated address, so if you are using feedburner etc then you need to give that address, not always the address you get from feed button on the browser.

  • all labels link to the same place - ensure you have put the "{0}" in the format string in the correct place.



I will update the control to allow individuals posts to be selected (by expanding the label on click)

In terms of security, you can copy the javascript files onto your server. The silverlight widget runs in a sandbox, so you can run it from my server, or hsot it on your own.

Note you should be able to use this on other blogging sites apart from blogger - the code between (and including) the DIV tag is all you need.

any problems drop a comment below!

Wednesday, November 5, 2008

Silverlight tag/label cloud for blogger

I've started trying to convert my silverlight tag cloud into a widget for blogger.

not fun :-( Blogger documentation is minimal, and I wasted too much time try to get blogger to tell me the feed address.

Have stopped at the hard-coded version for now - will move it forward later.

This latest version allows you to click on labels and see visually what the co-occurred with. Next steps will be to be able to see the list of posts for a label and to be able to open that post...

This representation does more that just look at how many times a label has been used (as per the blogger widget) - it looks at when the labels where used with other labels - which hopefully give a better "view" of what you are bloggin about.

more later, however the intention is to wrap this up into a widget that anyone can use on their blogger blog..

Thursday, October 30, 2008

Embedding Silverlight in blogger

A post to test embedding of Silverlight applications into blogger






which was achieved by adding to my blogger html template:
<script type="text/javascript" src="http://www.figmentengine.com/assets/script/silverlight.js" ></script>

and then each time I want to embed Silverlight in a post, a holder for the control:
<div id="simplekineticsHost" style="text-align: center;"><object data="data:application/x-silverlight-2," type="application/x-silverlight-2"></object></div>

and some javascript to control the silverlight settings:
<script type="text/javascript">  var host = "http://www.figmentengine.com/";  var source = host + "silverlight/kinetics/simplekinetics.xap";  var parentElement = document.getElementById("simplekineticsHost");  var callbackId = "simplekineticsHost2";  var properties = { width: "500", height: "350", version: "2.0.31005.0"};  var events = {};  Silverlight.createObject(source, parentElement,   callbackId, properties, events);</script>

this was based on this article, with a minor update for the release of silverlight 2.