Snipsnap and the ‘html’ macro

One of the add on features contributed  by the community to the snipsnap project was an {html} macro.

This is here… at the snipsnap site, and I have enclosed it as part of my mirror site. Obvioulsy best use snipsnap.org while it remains on-line.

This escaped the enclosed code and rendered it in raw HTML. The snipsnap macro defintion syntax was to use the embraced keyword twice, so {html}<strong>Important!</strong>{html}

I used it to include the google map widgets, the delicious tag cloud widget, getsatisfaction, which worked, see below, and Disqus which broke the backup. One of its most important extensibility features, as you can see above was it allowed Javascript.

The Disqus bug was because the backup format was XML, and snipsnap struggled with recursive CDATA elements. The Disqus scripts held CDATA elements, which snipsnap tried to enclose in the same tags. This failed on important.

I have also used this technique to get sharethis, addthis, flickr badges and pictures, wordle and big huge labs web badge to work. ( I think that’s it). It was useful if you wanted, needed, additional parameters beyond those available in the snipsnap img macro.

Get Satisfaction

An example of the get satisfaction code is as follows;

 
<div id="gsfn_list_widget">
  <a href="http://getsatisfaction.com/plazes">Active customer service discussions in Plazes tagged "davelevy"</a>
  <div id="gsfn_content">Loading...</div>
  <div><a href="http://getsatisfaction.com/">
<img alt="Favicon" src="http://www.getsatisfaction.com/favicon.gif" style="vertical-align: middle;" BORDER=0 /></a> <a href="http://getsatisfaction.com/">Get Satisfaction support network</a></div>
</div>
<script src="http://getsatisfaction.com/plazes/widgets/javascripts/c178c17/widgets.js" type="text/javascript"></script><script src="http://getsatisfaction.com/plazes/topics.widget?callback=gsfnTopicsCallback&amp;length=0&amp;limit=5&amp;sort=recently_active&amp;tag=davelevy" type="text/javascript"></script>

It is used on the Plazes article as well.

Extending Snipsnap (superceded)

This article, which was originally about how to extend snipsnap & was copied across from the snipsnap bliki on 20th June 2013, I gave up on Snipsnap later in the year, and the project has been abandoned by its authors. This content is thus pretty much superseded and the title but not the link has changed to reflect this.. There has been some minimal reformatting undertaken. There are two idioms used which are snipsnap specific; they have been left as originally published and are now a nonsense. Other things will read oddly as I did not pursue my plans. Embedding Disqus broke the backup utility, or more accurately broke the restore. Continue reading “Extending Snipsnap (superceded)”