I'd really like to steal some ideas from wsum.org's flash based on air schedule:
- Using a taxonomy to select program type which colors the shows so you could pick out all the metal or hip shows at a glance.
- Having a popup over the program when the mouse hovers over it with more info like genre, times and listen links.

Comments

refreshingapathy’s picture

Comment #1

refreshingapathy commented

So, bump of the century - my program director asked about colors on the schedule. I was going to make a new request for it, but this one is already here... how possible is this?

tim.plunkett’s picture

Comment #2

tim.plunkett
he/him
Primary language English
Location Philadelphia
commented
Version: 5.x-2.x-dev » 6.x-2.x-dev

I did something like this for WKDU. It doesn't really look that great, considering the randomness/emptiness of our schedule and the color choices, but check out wkdu.org/summer2010.
I'll post the theme function I used in the next couple days.

tim.plunkett’s picture

Comment #3

tim.plunkett
he/him
Primary language English
Location Philadelphia
commented
Status: Active » Needs work

Ugh, this isn't as graceful as I remembered it being. It works for me, but it can't be shoved into the module like this.
I put this right after the first line of THEMENAME_station_schedule_item.

$term = taxonomy_node_get_terms($program, 'weight');
$term = (!empty($term)) ? $term['0']->name : 'None';
$class .= " genre$term";

I made up some terms like Rock, Pop, Other. Then the class names would be genreRock, genrePop, genreOther.
Food for thought!

refreshingapathy’s picture

Comment #4

refreshingapathy commented

So, use taxonomy to assign a genre, and then are you thinking about hard-coding the assigned colors to the theme files?

tim.plunkett’s picture

Comment #5

tim.plunkett
he/him
Primary language English
Location Philadelphia
commented

Well when I implemented it, I was just making it work, I didn't really think it through for use within the module, and I didn't mind having to add a bunch of CSS to my theme.

I'm not sure how it would work if it was to be configured by the station module, how do you think that would look/function?

refreshingapathy’s picture

Comment #6

refreshingapathy commented

It would be really difficult to get this as an "out of the box" function just with the module, methinks... there's no good way to provide for theme/css overrides inside the module, is there? I don't mind having to add more CSS, I'm thinking more of the people who might not be very good with CSS and want it to work right away. Even classifying shows by taxonomy as a default option might be helpful, and the color-coding could be an "advanced feature" requiring you to patch your theme files. (I'm just thinking out loud here)

drewish’s picture

Comment #7

drewish commented

Could we just add the term ids as classes? That would allow some fun jQuery stuff like having a legend that when you hovered over a class you dim any other generes.

refreshingapathy’s picture

Comment #8

refreshingapathy commented

Now that you mention jquery...

http://plugins.jquery.com/project/color

Other projects have required jquery in the past, might be easy enough to require that plugin to get the functionality. Or just crib heavily from it and code it in. Maybe hovering over the legend would cause the color changes instead of dimming?

james64980’s picture

Comment #9

james64980 commented
Issue summary: View changes

Linking to taxonomy should not be too difficult.

but for now for anyone wanting their schedule loading css for their users as well as the person editing the programs you can use this code:

overwrite line 51 of station_schedule.pages.inc with the following code:

 // Get css field
 $css_raw = field_get_items('node', $program, 'field_station_program_css_class');
 if ($css_raw) {
	// read value of css field (only one field permitted)
 $css_item = reset($css_raw);
 $css_class = $css_item['value'];
 }
 else{
	// prevent errors with fallback
	$css_class = "";
 }
 $class = 'station-sch-box station-sch-scheduled '.$css_class;

This will require you to modify your station_schedule.css file for each program class you wish to have. Here is a example:

.Eclectic a{
	color: #CCC !important;
	background-color: #360;
}
.Eclectic a:hover{
	color: #FFF !important;
	background-color: #250;
}

edit:
This is for the D7 edition. not sure about D6