* @version 0.1 - Aug 25 2006
*/
//error_reporting(E_ALL);
class Scrib_default_templates {
public function summary($bibr){
global $scrib_importer;
$result = '
';
if($bibr['img']['thumb']['url']){
$result .= '
[[bookjacket|]]
';
}else{
$result .= '
[[bookjacket|]]
';
}
$result .= '
Attribution
'. $bibr['attribution'][0] .'
';
$result .= '
Format
'. $bibr['format'][0] .'
';
$result .= '
Published
'. $bibr['pubyear'][0] .'
';
if(count($bibr['url']) > 0){
$result .= '
';
$result .= '
Links
';
$result .= '
';
foreach($bibr['url'] as $temp){
$result .= '
' . $temp . '
';
}
$result .= '
';
$result .= '
';
}
if($bibr['shortdescription'])
$result .= '
Description
'. $bibr['shortdescription'] .'
';
// build a block of tags
$tags = NULL;
if($bibr['subjkey']){
foreach($bibr['subjkey'] as $temp){
$tags[] = '' . $temp . '';
}
}
if($bibr['author']){
foreach($bibr['author'] as $temp){
$tags[] = '' . $temp . '';
}
}
if($tags){
$result .= '
Tags
'. implode(' · ', $tags) .'
';
}
// end tag block
$result .='
';
// echo($result);
return($result);
}
//
//
// take the array and return the full record display
//
public function full($bibr){
global $scrib_importer;
$result = '