Green IT is all about saving the environment, or so we are told. In reality, 'greening' only became popular once companies realised that it provided a benefit they understand well — saving cash. Discover everything you need to know about Green IT in this ZDNet.com.au superguide.
[?
ini_set("memory_limit","200M");
//Get all stories related to Green
library('/zdnet/livery/storyfragments/data/get_related_stories_by_keywordsolr.htm');
$whitepaper_display_limit = 34;
$categoryList = array(
'insight' => array('name' => 'Features and Case Studies', 'channel' => array('Insight', 'Blogs')),
'news' => array('name' => 'Related News', 'channel' => 'News'),
'whitepaper' => array('name' => 'Whitepapers'),
);
foreach ($categoryList as $catLabel => $catInfo) {
?]
[?= $catInfo[name] ?]
[?
if($catInfo[name] == "Features and Case Studies"){
?]
[?
}
?]
[?
unset($options);
$options[rows] = 0;
$options[keywords] = array("green");
$exclude_element_ids = array(339289591, 339277919, 339277887);
if($catLabel == "whitepaper"){
$options['fq'] = 'type:whitepaper';
$options['type'] = "whitepaper";
}else{
unset($options['type']);
$options['fq'] = (is_array($catInfo['channel']) ? '+category:('.implode(' OR ', $catInfo['channel']).')' : '+category:"'.$catInfo['channel'].'"').'+type:story';
}
$options['sort'] = '';
$return_arr = get_related_stories_by_keywords($options);
$count = 0;
foreach($return_arr as $story){
if(in_array($story->id, $exclude_element_ids)) continue;
unset($url, $title, $desc);
if(isset($options['type'])){
if($options['type'] == "whitepaper"){
if($count >= $whitepaper_display_limit) continue;
$whitepaper_obj = new Product($story);
$GLOBALS[WP_CHANNEL_NAME] = "whitepaper";
$GLOBALS[WP_DISPLAY_TID] = "2000063328";
$url = "/".$GLOBALS['WP_CHANNEL_NAME']."/0,".$GLOBALS[WP_DISPLAY_TID].",". $whitepaper_obj->product_id ."p-". $whitepaper_obj->prod_cat_id ."q,00.htm";
$title = $whitepaper_obj->product_name;
$desc = str_replace(array(""), "", implode(" ", array_slice(explode(" ", $whitepaper_obj->attrib_20009355), 0, 40)))."...";
}
}else{
if($story->id == 0) continue;
$url = $story->url;
$title = $story->title;
$desc = $story->long_summary;
}
if ($count%4 == 2) { ?]
[? } else if ($count%4 == 0) { ?]
[? } ?]
[?= $title ?]
[?= $desc ?]
[?= ($count%2 == 1) ? '
' : '' ?]
[?= $count == 3 ? '
More '.$catInfo[name].' »
' : '' ?]
[?
$count++;
}
?]
[?= ($count%2 == 1) ? '
' : '' ?]
[?= $catLabel == "whitepaper" ? '
More whitepapers related to \'Green\' »
' : '' ?]
[?
}
?]