Categories
Diversity Weblogging

What was interesting

Recovered from the Wayback Machine

…about the aftermath of the weblogs.com incident last week, is that for the most part, male bloggers rallied around Dave Winer or the male bloggers that he bashed in comments here and there. I figure either these other folks agree with Winer’s take on us uppity women; or they feel we’re strong enough to provide our own support, and prefer to reserve theirs for the weaker sex.

Either way, welcome to the fraternity that is weblogging.

(Now, why was it again there are no women involved with the RSS or Atom discussions?)

Categories
Semantics

Emotive

In my last post, Scott mentioned being able to change the stylesheet based on the mood of the writing–derived from the occurrence of trigger words such as ‘anger’, or perhaps mention of certain names.

The problem with a keyword-based solution is that without knowing the context, you really can’t determine how a word is being used. For instance, I could have a funny post that uses anger a lot, and it could be blazing red by the time I’m done, but there’s no real anger involved.

In addition, we’ve learned from Google how keywords can work, sometimes, and not, other times.

I believe no better tool exists for setting the context of a writing than the human brain. Of course we’ve found that many other factors can come into play even when the context is defined. This is the reason that smileys–those spawn of the devil– are so popular: to add hints so that a person can tell if something is supposed to be a joke or not. As we get to know each other, we’re better able to differentiate the mood of our writing based on past experience, known triggers, or word use. Even with this exposure, we still fall into little traps of misunderstandings.

In preparation for other work I’m doing, such as Poetry Finder, I’ve started working with WordPress’ key-value meta tags with each post, in this case to set a ‘tone’ of the individual writing. I’ve begun with a small set of tones and appropriate stylesheets; a set which I’ll add to over time. I’ve managed to get five tones so far, but only annotated ten postings.

If you use Emotive from the front page, category, or archive, you’ll get my favorite of the emotive sub-stylesheets. However, if you access an individual page, you can see the stylesheet based on the tone I set in the writing. If a tone isn’t set for the posting, again you’ll see the default.

Why do something like this? Well, it’s fun. More than that, though, I want to see how far I can ‘blur’ the lines between traditional front end technologies, such as (X)HTML, CSS, and JavaScript; and traditional backend tech such as PHP and MySQL.

The latency you see with the stylesheet being applied with each page is due to the fact that there is some overhead on the server when serving up the stylesheet. In addition, changing from page to page doesn’t allow caching. That’s the downside of this type of server-based processing in stylesheets – if the stylesheet changes from page to page. A better approach could be to use Javascript on the client to make the changes, triggered by a value set by the PHP application.

But it’s an interesting exercise.

(I’ll cover the technology used a little later in another writing.)

Categories
Photography Places

Shut out

Recovered from the Wayback Machine.

The weather Saturday was lovely with cooler temperatures, and a lot less humidity. I’d been cooped up all week working on this and that and was in a mood for a long drive. As I hadn’t been to the Johnson Shut-Ins since early Spring, I wanted to see how they looked in the Summer and headed in that direction.

I can see why the Shut-Ins are so popular – they are extraordinary in all seasons. However, it’s in the summer that their true beauty reaches its peak, with the dark green of the trees, and the rust and pale blue of the surrounding rocks, offsetting the turquoise/aqua of the water. There are little pools in and among the rocks you can wade in, or go further downstream if you prefer sandier conditions. Though my camera has been problematical lately, I still managed to grab some fairly decent photos.

Lots of people at the park, but it’s large enough so you never feel crowded. You can swim at the Shut-Ins, but walking around isn’t easy – the rocks are very uneven and slippery.

There’s a boardwalk that surrounds the Shut-Ins and then steps that take you to the rocks themselves. Last time out I managed to walk around the rocks; however, this time I had to refrain because my ankle is still swollen and bruised from the last major fall, and further irritated by some injudicious hiking. Recently, I’ve had to use a hiking stick even on flatter grounds.

But I was wistful, as I stood at the bottom of the steps and looked out at all the people having fun and exploring. I wanted nothing more than to be in cut-offs and swimsuit and to jump into the water and feel the aeration of the falls around me. It must be like swimming in champagne.

A young man, probably in his early 20’s, saw me at the bottom of the steps leaning on my walking stick, looking longingly at the others playing. He started past and then stopped and turned around, and asked if I needed help to get around the rocks. I was both pleased by such generosity and chagrined that he would offer to help. After all, I’m only…

..well, only close to 50, walking with a limp, and in obvious need of my walking stick. Or helping arm.

I did thank him with the warmest smile I could pull up, as I declined his help, telling him that the rocks and my ankle would not be a good mix. I refrained from telling him that what he sees isn’t what I am.

What I feel, what I am, is that young girl sitting on the rocks by herself, looking at the water flowing past, playing with her hair and just dreaming of whatever. As long as no mirrors or helpful young men are about, that’s what I am.

Categories
Technology

Clashing colors

Hell grant soon we hear again the swords clash!
And the shrill neighs of destriers in battle rejoicing,
Spiked breast to spiked breast opposing!
Better one hour’s stour than a year’s peace
With fat boards, bawds, wine and frail music!
Bah! there’s no wine like the blood’s crimson!

Ezra Pound’s Sestina: Altaforte

What a serendipitous time to introduce my latest stylesheet creation: Clashing Colors. It’s been said that our words are all that matter; that the colors and pages we wrap around ourselves are but a gilding of a lily, and why is it that we don’t provide full feeds in RSS files?

What matter our page design?

It’s also been asked: why can’t we all just get along? Yes, why can’t we get along. Is it because we’re both unique and imperfect?

I have found there are six degrees of separation between these statements:

Why can’t we all just get along

…why can’t we complement each other

…why isn’t this environment more complementary than contentious

…so much of our writing to each other is contentious

…contentious or not, all that matters is the writing

…all that matters is the writing

What matters our page design?

Clashing Colors uses PHP to dynamically generate colors for different elements of the stylesheet. It also uses a random photo generator, except unlike Random Shot, the photos are all weather related and in black & white. The bit of code and CSS that controls blockquote is as follows:

blockquote {
<?php
$hx = substr(‘000000’ . dechex(mt_rand(0, 0xffffff)), -6);
echo “color: #” . $hx . “;”;
?>
}

Just use the $hx=substr… statement for each color area.

When I was playing with this page, I was surprised at how many times an attractive color combination appeared. Perhaps we worry too much about making sure everything fits together, and should just let chaos reign.

The man who fears war and squats opposing
My words for stour, hath no blood of crimson
But is fit only to rot in womanish peace
Far from where worth’s won and the swords clash
For the death of such sluts I go rejoicing;
Yea, I fill all the air with my music.

Papiols, Papiols, to the music!
There’s no sound like to swords swords opposing,
No cry like the battle’s rejoicing
When our elbows and swords drip the crimson
And our charges ‘gainst “The Leopard’s” rush clash.
May God damn for ever all who cry “Peace!”

And let the music of the swords make them crimson!
Hell grant soon we hear again the swords clash!
Hell blot black for alway the thought “Peace”!

Then again, maybe not.

update

To save a specific set of colors, do a screenshot of the page and then use a color ‘eyedropper’ application to pick out the individual colors. Adobe Photoshop has this functionality, as does several other graphics tools. Or you can download a shareware application that works quite nicely.

Just don’t update the page until you grab that copy.

Categories
Burningbird

Pick your bird

I’m still playing with new styles for the site. I find when I’m tired or want to think about a topic before I write on it that playing around with a new style is very soothing. After all, it’s very easy because all of the styles use the same basic layout and layout is the tough part of a web page design.

I thought I would write out the details of how all this works since the sheet switching seems to be working relatively well. I’m still tweaking, but that’s primarily because of my extensive use of photos and graphics.

I borrowed the dynamic stylesheet loading Javascript from Michael Hanscom, who got it from an A List Apart article. You can also download a copy here. After downloading, rename it to “styleswitcher.js”.

The ALA article has good coverage about adding the switcher code and how it works so I won’t repeat it. What I’ll talk about instead is what I’m doing with my own site, including using PHP to generate CSS.

First, all of the sites have the same basic layout. Once I found what I liked, I kept it and this makes site redesign more a matter of fun exploration than work.

The basic design is two columns, usually centered, each separated slightly from the other. Within the sidebar column on the left, several discrete sections containing images and things like Recent Comments and other lists are framed within another ’sidebar’ section that usually doesn’t have any background (Walker Evans differs).

I made no attempt to ‘contain’ these sidebar items, hence creating the effect a friend called the “floating clouds”. I also make no attempt to ensure that all the segments are exactly the same size, and spaced exactly the same. Clouds in nature are imprecise and chaotic and so are my sidebar clouds.

(Besides, I’m also a little chaotic so the design suits me. And it feels so good to drive the anal among you crazy with my irregularities.)

Now, to change the sidebar images with each stylesheet, what I did was create a set of nine DIV blocks, img1-img9, that have a different image as a background image, just as I use a background image for the entire page. From Fire & Ice, one of the image blocks looks as follows:

div.img1 {
background-image: URL(./look/noaa2sm.jpg);
width: 200px; height: 131px; margin: 0px; padding: 0px
}

The main page has the DIV blocks embedded into the sidebar, but if the matching DIV class is not included, nothing shows – as you’ll see in Old Bird. Otherwise, the image defined in the stylesheet is what shows.

Of course, this has some latency effects with some browsers and an embedded transparent GIF within the block would help overcome this – but the sidebar images I use differ in size from stylesheet to stylesheet. So, for the nonce, the slight latency issue remains.

You can access any of my style sheets just by opening my main page, getting the stylesheet names, and then saving the sheet. As for this page, well, a girl has to have some secrets, doesn’t she?

Seriously – you can access a copy of the main index page design here.

Finally, a new approach that I’m exploring now can be seen in a style called “Random Shot”. This style, still under development, is a combination of PHP and CSS that uses a random generator to access a database containing names of photos I have stored on my server, and change the image with each page load. You’ve seen random photos in my main page, but that’s a pure PHP page.

It’s relatively easy to combine CSS and PHP. To have the web server process the PHP in the CSS file, you need to name the file with a PHP extension instead of CSS (unless you’re playing around with your .htaccess file – more in a later writing). However, to ensure that a page is returned as a specific type to the browser, in this case CSS, include a PHP header function call as the first bit of code in the page and set the document type:

<?php

header(’Content-type: text/css’);

?>

Now, the page will be processed as PHP, but returned to the browser as CSS.

Include the link to this page as you would any other CSS page:

<link rel=”alternate stylesheet” media=”screen” title=”randomshots” href=”http://weblog.burningbird.net/photos.php” type=”text/css” />

At this time, I’m using a file with names of photos for my test stylesheet, but you can use a database or anything else you want:

<?php

// script is RandomImage, from Enter the Fog
$url = file(“http://burningbird,net/somefile.txt”);

//generate a random number
srand((double)microtime() * 1000000);

//change the number after the % to the number of images
//you have
$ct = count($url);
$rn = (rand()%$ct);

//display the banner and link . This opens in a new window
$imgname = trim($url[$rn]);
printf(“background-image: URL(’%s’);”, $imgname);
?>
width: 200px; height: 130px; margin: 0px; padding: 0px
}

You can use PHP to do anything within your stylesheet. Think of the possibilities….

All you have to remember is that the more processing you put in, the slower the page loads. And if you dynamically generate the stylesheet, it won’t cache between access. However, unless the file is large or uses a lot of photos –ahem– you shouldn’t have any problems. If you use a lot of photos or processing though, there could be a noticable lag between when the page loads and the stylesheet kicks in.