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.

Decorating Blockquotes

Now I have one of those pretty quote decorations in my quotes on this wiki.

  1. The decoration is an image.
  2. I used mspaint to capture a large quote mark. I used Engravers MT.
  3. I then used paint.net to rotate and flip it, crop it, and then make the white background transparent. As advised in the paint.net forums, I used the magic want tool, capture the background and then “cut” it out.  The file needs to be a transparency supporting format for this to work.

    quote

  4. I uploaded the file to my web server.
  5. I then used the WordPress CSS editor to add the following code,
.entry blockquote { background: #EEE url("http://davelevy.info/TOKENS/OQuote_GreyTransparent.png") no-repeat; }

As you can see, the background rule takes two arguments, a base colour and the image, the rune required is the no-repeat key word. It also benefits from the definition of some padding rules. In my case,

     padding-left: 16px; padding-top: 16px;

and now onto fixing the code tag.

XSLT

As the discussion on Snipsnap to WordPress implies, I am having another look at using XSLT to convert my old snipsnap dump to WRX.

Links

and an article at stackoverflow, which includes a book list.

Making from source

I decided to remake my copy of xslt on davelevy.info. I got instructions from http://www.sagehill.net/docbookxsl/InstallingAProcessor.html

I got the sources from http://xmlsoft.org/sources/

Currently,

  1. http://xmlsoft.org/sources/libxml2-2.7.2.tar.gz
  2. http://xmlsoft.org/sources/libxslt-1.1.20.tar.gz

Then run configure && make, see below because I I do not have root privilidge

$ ./configure --prefix=$HOME/xslt