Closed (fixed)
Project:
Event
Version:
4.6.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Jan 2006 at 03:55 UTC
Updated:
2 Dec 2007 at 17:47 UTC
I wanted little images relating to the taxonomy of the event (in this case, the hosting organization). Add the following piece of code at the beginning of the function theme_event_node_month in the file event.theme (just the if-statement shown below). Put it as the first line of code in the function.works for 4.6 (NOT FOR 4.7)
/**
* Format an event node for display in an expanded calendar, like a calendar page
*
* @param node
* The node being displayed
* @param module
* The name of the external module calling the function. Default: null;
*/
function theme_event_node_month($node, $module = NULL) {
static $stripe, $stripe_map;
if (module_exist("taxonomy_image") ) {
foreach (taxonomy_node_get_terms($node->nid) as $term) {
$images[] = taxonomy_image_display($term->tid, "alt='$term->name'");
}
}
.
.
.
.
Comments
Comment #1
rosenblum68 commentedSorry, I forgot a line.
After adding the above, replace the following line in the same function:
with this line of code:
Also, this works in 4.7 as well. I was using versions of event.theme:
// $Id: event.theme,v 1.5.2.15 2005/10/04 12:02:30 killes Exp $
// $Id: event.theme,v 1.5.2.16 2005/12/05 03:05:53 killes Exp $
Comment #2
rosenblum68 commented[ignore, im changing title]
Comment #3
nrasmus commentedCool idea--could you possibly assist this relative php newb--I'd like the taxonomy term (text) to appear in the event listing (so it would appear in a calendar, not just above it). Is this easy to achieve?
Comment #4
nrasmus commentedNevermind--I decided to make images, and use your suggestion. It is very nice! Any chance this functionality can be added to event, or taxonomy_images? I'd like to see this futureproofed.
Thanks!!!!
Comment #5
killes@www.drop.org commentedThis version of event.module is no longer supported. Please update your site. If the issue is still valid, don't hesitate to re-open it against a more recent version.