GreyMamba

Thinking Allowed … (under construction)

Thinking Allowed … (under construction)

A computer once beat me at chess, but it was no match for me at kick boxing.
Emo Philips
Snippets covering IT techniques, Python coding and Rapidweaver
Just a section to cover anything related to 'Information Technology'. Computers, Coding, Algorithms, A.I. and so on. There will probably be quite a bit on how to make a web site (one of the reasons I'm actually doing this is to learn how) including much on Rapidweaver and Stacks. There will be code - most likely Python along with general computery items.

I'm quite into Python programming and as such I've written a bit of an interactive Python booklet (link opens in new window) covering some of the stuff needed to program in it.

It's probably appropriate to mention here that I've used RapidWeaver 8 to help me generate this website. I've also made use of the excellent Free DNS service to overcome the limitations imposed by not having a static IP address.

Rapidweaver 'Poster Stack' - generating sidebar search code

The inStacks documentation indicates that the Poster Stack does generate an "RW Default" archive for your use and delectation. This is great and it gives some tantalising code snippets but crucially doesn't give a blow by blow account of what to do - bugger! Lots of googling and I was only a little bit wiser ( also the story of my life).

So, what to do? I could ask on forums or even ask inStacks but where’s the fun in that? Also, I’m an unreconstructed dinosaur and as any modern young person (kids) will tell you, we never ask for directions or RTFM!

As an aside, I guess many of you know that RTFM means “Read The F&%@ing Manual” but not everyone knows the origin of the rather gentle phrase ‘Fubar’ or ‘FooBar’ – or ‘foo’ and ‘bar’ (oft used generic names in coding). Well my understanding is that this originated in the Vietnam conflict and comes from the phrase “F&%@ed Up Beyond All Recognition” (which, of course, it was ).

Back to the story in hand. Firefox is nice because it has an easy-to-use ‘Inspector’ feature that allows you to look at any web page’s underlying code. So, I inspected some of the example Poster Stack web pages and managed to glean some snippets that might work when inserted into a sidebar. They didn’t. So, I tried again … and again and … finally the infinite monkey drive fired into life and something actually started to function.

So now I could write code to produce a sidebar menu system with clickable links that would take you to all posts with a given Category, Tag or date. Great – but it was all a bit text-editor intensive. Next step, fall back on trusty Python and generate it. This I’ve now done and all you have to do is feed the code with a file containing lines indicating Categories, years and tags and, hey Presto, I’ve got a file full of code to paste into my site’s sidebar.

You can get the the zipped code - not pretty but seems to do the trick - by clicking the button below.

UPDATE: Don't know if it was me or the poster-stack updates but the whole thing is much easier now. For the Categories and Archive sections, just include something like:

<h3>Categories</h3><span class="poster-archive-categories"></span>

and

<h3>Archive</h3><span class="poster-archive-date-year"></span>

I've left the Tag Cloud stuff as-is because you get more control on formatting.

YAU (Yet Another Update). Using a sidebar for the filter uses up quite a bit of web-page 'real estate'. So, I've now moved the filter code to an area at the top of the page and rather than have it displayed continuously it sits in an area 'toggled' into existence using Staks4Stacks 'Toggle' stack.

Python code - generating sidebars
0
Back

Nice photo from an unusual perspective. Kudos to Joshua Sortino

RapidWeaver Icon

Made in RapidWeaver