$uid));
$telli = $puser->profile_telliblogi;
}
if($telli==1){
$address = $_SERVER['SERVER_NAME'];
$block_content .= '
';
$blogiParing = db_query("SELECT n.title, n.changed, n.nid FROM {node} n WHERE n.type = 'blog' AND status=1 ORDER BY changed DESC LIMIT %d", 3);
$block_content .= '
Viimased blogi kanded';
while ($blog = db_fetch_object($blogiParing)){
$nameAlone = $blog->title;
$nameLength = strlen($nameAlone);
if($nameLength<=25){
$newName=$nameAlone;
} else {
$newName = substr($nameAlone, 0, 25);
$newName .= '...';
}
$block_content .= '
[ '.date('d.m.Y', $blog->changed).' ]
';
}
$block_content .= '
';
}
if ($block_content == '') {
$block['subject'] = '';
$block['content'] = '';
return $block;
}
$block['subject'] = '';
$block['content'] = $block_content;
return $block;
}
}