'; if($uid==$user->uid){ $sopradeParing = db_query("SELECT ur.requestee_id FROM {user_relationships} ur WHERE ur.requester_id = %d AND approved=1 ORDER BY updated_at DESC LIMIT 3", $user->uid); while ($sober = db_fetch_object($sopradeParing)){ $tegevuseParing = db_query("SELECT a.data FROM {activity} a WHERE a.type='comment' AND a.operation='insert' AND uid=%d ORDER BY a.created DESC LIMIT 1", $sober->requestee_id); $puser = user_load(array('uid' => $sober->requestee_id)); $eesnimi = $puser->profile_eesnimi; $picture = $puser->picture; while ($tegevus = db_fetch_object($tegevuseParing)){ preg_match_all('|s:16:\"parent-node-type\";s:(.*):\"(.*)\";|U', $tegevus->data, $tyyp); preg_match_all('|a:(.*):{s:11:\"comment-cid\";s:2:\"(.*)\"|U', $tegevus->data, $kommentaariId); $kommentaariParing = db_query("SELECT * FROM {comments} c WHERE c.cid=%d", $kommentaariId[2][0]); $kommentaar = db_fetch_object($kommentaariParing); $node = node_load($kommentaar->nid); $kommnetaariPealkirjaParing = db_query("SELECT * FROM {term_data} td WHERE td.tid=%d", $node->field_raamatu_pealkiri[0]['value']); $kommentaariPealkiri = db_fetch_object($kommnetaariPealkirjaParing); if($picture==""){ $piltIse = ''; } else { $piltIse = ''; } $kommentaarTrim = strip_tags($kommentaar->comment); $nameLength = strlen($kommentaarTrim); if($nameLength<=120){ $uusKomm=$kommentaarTrim; } else { $uusKomm = substr($kommentaarTrim, 0, 120); $uusKomm .= '...'; } if($tyyp[2][0] == 'blog' || $tyyp[2][0] == 'uudis'){ $uudisePealkirjaParing = db_query("SELECT n.title FROM {node} n WHERE n.nid=%d", $kommentaar->nid); $uudisePealkiri = db_fetch_object($uudisePealkirjaParing); $block_content .= '