This Broadband Superguide consolidates a massive selection of features, blogs, case studies, news stories and whitepapers to provide everything you need to know about broadband.
[?
ini_set("memory_limit", "500M");
//Get all stories related to green
library('/zdnet/livery/storyfragments/data/get_related_stories_by_keywordsolr.htm');
$whitepaper_display_limit = 34;
$categoryList = array(
'reviews' => array('name' => 'Reviews', 'channel' => 'Reviews'),
'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] == "Reviews"){
?]
[?
}
?]
[?
unset($options);
$options[rows] = 10;
$options[keywords] = array("broadband");
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){
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?feed=pt_339294839";
$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.'?feed=pt_339294839';
$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 \'Windows Server 2008\' »
' : '' ?]
[?
}
?]