Singpolyma

FreshTags-Singpolyma 2

Posted on

FreshTags is a context-based navigation system based on tags. The most current ‘official’ version is v0.5 as seen on FreshBlog. I have also run my own version as a contribution to the effort. With the advent of Blogger BETA, the original purpose of adding categories to Blogger is gone and now the emphasis is on the tag passing, etc. Complaints have been abundant that neither version of FreshTags would work properly on the BETA. This milestone upgrade in my version aims to both fix that problem, as well as give FreshTags the boost it needs for future growth.

The script is hosted in the same entry on JScripts, and is 100% backwards-compatible with my previous version. To use it forwards-compatably, however, requires a considerably different setup, therefore I am re-authoring the basic instructions post here, and the old one shall be ‘deprecated’ (with a link here). There are many customisation options and different ways things can be done for FreshTags, especially with the new system. In this post I will cover some basics. Later posts will cover more functionality, and links to those posts will be added here.

Basic Installation for ‘Classic’ FreshTags Functionality
To install this version of FreshTags so that it works about the same as the original FreshTags (as it runs on FreshBlog), you will need this code:


<!-- FreshTags0.5-Singpolyma2 -->
<script type="text/javascript">

   if(typeof(WidgetData) != 'object') WidgetData = {};
   if(typeof(WidgetData['freshtags']) != 'object') WidgetData['freshtags'] = {};

   //tag widget
   WidgetData['freshtags']['freshtags_tags'] = {
      'type':'tags',
      'source':'del.icio.us',
      'username':'Delicious Username',
      'anchor':'Anchor Tag (optional)',
      'format':'drop'
   };

   //posts widget
   WidgetData['freshtags']['freshtags_posts'] = {
      'type':'posts',
      'tag_list':'freshtags_tags',
      'rows':'10'
   };

</script>
<script type="text/javascript" src="http://jscripts.ning.com/get.php?xn_auth=no&id=818185"></script>
<div id="freshtags_tags"><i>FreshTags Loading...</i></div>
<div id="freshtags_posts"></div>
<a href="http://ghill.customer.netspace.net.au/freshtags/" title="Categories by FreshTags"><img src=" http://ghill.customer.netspace.net.au/freshtags/freshtags-btn.png" alt="FreshTags" /></a>
<!-- /FreshTags0.5-Singpolyma2 -->

Advanced users will note that this JavaScript does not have the needed commented CDATA section for XML well-formedness. This is because of an issue with Blogger BETA. If you are on a classic blog, feel free to add it in (as I have), but since no special characters are likely to be used in this particular piece of JavaScript code, it doesn’t matter much.

Replace Delicious Username with your del.icio.us username and Anchor Tag (optional) with your del.icio.us anchor tag (or blank for none). The ‘format’:’drop’ may be set to list, flat, drop, drop-add, drop-add-async, or any other legal format string from my previous version.

To install this on a Blogger Classic blog, add the entire code into your blog template at the place where you want the tag list and post list to appear.

To install this on a Blogger BETA blog, create a new HTML/JavaScript widget, set the title to whatever you want, and place the entire code in the body, then save.

‘Fake Post’ functionality
To install this version so that it uses a ‘fake post’ to display tags, as my original did, add this line to the end of the ‘//tag widget’ section:


WidgetData['freshtags']['freshtags_tags']['tag_url'] = '/2000/01/tags.html';

//postpage widget
WidgetData['freshtags']['freshtags_postpage'] = {
   'type':'posts',
   'tag_list':'freshtags_tags',
   'format':'list-extended'
};

My original version also used the drop-add format, so if you want to mimic that behaviour exactly you must change the format line as well.
(Note: for this to work you will have to have a post entitled Tags, dated January 1, 2000 with the code <div id=”freshtags_postpage”></div>)

Labels page (BETA only)
To install this version so that it uses the Blogger BETA labels page for display, add this code to the end of the ‘//tag widget’ section:

WidgetData[‘freshtags’][‘freshtags_tags’][‘tag_url’] = ‘/search/label/%tags%’;
WidgetData[‘freshtags’][‘freshtags_tags’][‘join_char’] = ‘/’;

It is important to note that, except for the sidebar, the display on this page is generated by Blogger and not by FreshTags. This breaks tag-passing a little bit. In the next minor revision I will add code to append the ?tags=TAGS to the link URL on any links that have rel=”bookmark” on them (the microformats standard for permalinks).

To turn off autocapture of tags from rel=tag data on any of these, add this code to the end of the ‘//tag widget’ section:

WidgetData[‘freshtags’][‘freshtags_tags’][‘no_autocapture’] = no_autocapture;

One thing you’re probably wondering is if this will work with the BETA labels with no del.icio.us account. No. That may be coming, but I can’t promise anything yet. Does the peek-a-boo sidebar, etc still exist? Yes, but this post is long enough, so I will write another article explaining all that soon.

FreshRolls (Wrinks)

Posted on

I have added a new feature to my Wrinks app. In the spirit of FreshTags we have FreshRolls.

If you go to a wrink page (for example, the Blogger Hacks Wrink), you will note a third code option. FreshRolls are currently only available in JavaScript (no PHP yet). You can select what blog to exclude (or none), just as on the normal roll output, and whether this code is to be used in conjuction with ring code or not (more on that in a bit). The code is then a simple JavaScript include, as with standard rolls, that you place where you want the FreshRoll to appear.

FreshRolls attempt to detect tags and ‘passed tags’, just like FreshTags. If it finds some, it will display only those blogs which match the tag(s) found, otherwise it will normally display the entire roll. If, however, you told it you would be using it with a ring, it will not display a roll title and if no tags are detected will output none of the roll.

What is this ‘combo-mode’ useful for? Well, if you paste standard ring code followed directly by FreshRoll code set to ‘combo-mode’, if tags are detected the matching blogs will be displayed following the ring, otherwise you just see the ring. I have set it up this way in my sidebar. You can test it by appending ?tags=blogger to this page’s URL and reloading.

Blogger BETA compatible : Just create a new HTML/JavaScript widget on your BETA blog and cut-n-paste in the code(s) from Wrinks.

First Blogger BETA Template

Posted on

Please see my Singpolyma Templates for the New Blogger

This is the first Blogger BETA custom template based on my Singpolyma Templates. This will not be a final version because it still has some slight bugs, but I would like feedback from users before I make any changes. You can preview the new template at my BETA blog. The spirit and look of the original basic template has been ported to the new widget system, and all fonts and colours can also be edited from the new panel for that purpose. Minor known issues are:

  1. Not even close to XHTML compliant. This is not my fault. There are significant JavaScript sections on Blogger BETA that are malformed XML and thus break any sort of compliance. I’ve written support, but I doubt that will do any good. We need to find a way to put serious pressure on them to correct this. The new template system is in XML, make XML-well-formed output (and perhaps even XHTML-compliant output) has never been easier, and yet so far away. The changes they would have to make are minor (like, adding commented CDATA sections around the JavaScript). I don’t see a thing about it on Known Issues.
  2. Ditto to peek-a-boo comments. This is a limitation in the BETA as far as I can see… I really hope they can be persuaded to fix this.
  3. The pre-included blogroll is XOXO compliant, but has fewer features as the manually-created ones did (ie, no option for feed data).
  4. No link to main comments feed (it doesn’t seem to be generating, I believe this is a known BETA issue…)

The profile section supports both single and group blogs, unlike the original which assumed a single-authorship blog. I could also add previous/next links on item pages and a labels sidebar widget if people want it. Versions with my other hacks (as before) will be forthcoming.

To install this template on your blog, cut-n-paste the template from here into the ‘Edit HTML’ view on your BETA blog, click ‘Save’, and if you are asked to confirm the deletion of existing widgets click the affirmative option. Then you can add/edit widgets or change the colours!

Windows Media Streams on Ubuntu

Posted on

Since I did all the research on this yesterday to get it working, I figured I’d share it with the world in case someone else is having problems with it too! These instructions assume Ubuntu, but should work on pretty much any Linux system with minor modifications.

1) You must have a GStreamer player installed. Totem (the defaul GNOME movie player/media player) is what I used because it was already installed.
2) Install gstreamer0.10-plugins-bad with Synaptic
3) Go to MPlayer and download the binary codecs for Linux. Unpack the file into either the /usr/lib/win32/ directory or the /usr/lib/codecs directory (depending on your system, I put it in both to be safe).
5) Install gstreamer0.10-pitfdll with Synaptic (if available) or get it from a mirror.
4) Install gstreamer0.10-plugins-ugly with Synaptic

That should be it! You should now be able to listen to Internet radio stations in the Windows Media format.

BETA Upgrades Progress

Posted on

Since the Blogger-released Widget Code Help and Johan’s Post, progress on BETA conversion has been much easier. Check my BETA Blog and you’ll find that I have most of the old post functionality and look done, with the following exceptions:

  • Feed information (often hidden) in template header. This is because Blogger BETA puts feed information for the whole blog in with the posts (that’s dumb) and basically expects you to have it in the footer of ever post (even dumber). Have yet to find a way around this (besides hard-coding the links).
  • Peek-a-boo comments… uh… Blogger? Little help? Comment data is only accessible on item pages…
  • Date no longer links to archive… that data is gone (and wasn’t terribly useful anyway)
  • I haven’t got it so the colour-changer works yet, but you can’t see that from my blog 😉
  • Minor XHTML breakage because the widget tags generate divs, and divs aren’t legal inside ul tags

Improvements due to BETA:

  • Tags look the same, but are now drawn from the new labels field
  • Peek-a-boo backlinks are no longer a hack
  • Comment author is now properly marked up as an hCard

The sidebar will come next (widitized! although I’ll leave the comments for full XOXO-compliant blogrolls for advanced users), then perhaps some new features (like next/prev links on item pages). Then work will start on comment forms, etc.

Tags: