term_name; $q2='SELECT DISTINCT(node.nid) AS nid, node.title AS node_title, FROM_UNIXTIME(node.created) AS node_created,taxonomy_term_data.name AS term_data_name, taxonomy_term_data.tid AS term_data_tid, node_comment_statistics.comment_count AS node_comment_statistics_comment_count, users.uid AS users_uid, field_data_field_column.field_column_value AS column_value, field_data_body.body_value as body FROM node node LEFT JOIN node_comment_statistics node_comment_statistics ON node.nid = node_comment_statistics.nid LEFT JOIN taxonomy_index ON node.nid = taxonomy_index.nid LEFT JOIN taxonomy_term_data ON taxonomy_index.tid = taxonomy_term_data.tid LEFT JOIN users users ON node.uid = users.uid LEFT JOIN field_data_body on node.nid=field_data_body.entity_id LEFT JOIN field_data_field_column field_data_field_column ON node.nid = field_data_field_column.entity_id WHERE field_data_field_column.field_column_value = '.$row->term_id.' GROUP BY nid ORDER BY node_created DESC '; $res=db_query($q2); $x=0; //while($nrow=db_fetch_object($res)) foreach($res as $nrow) { if($x==0) { $userqry='SELECT users.uid AS uid, users.name AS users_name, users.picture AS users_picture, users.mail AS users_mail,file_managed.uri as path, field_data_field_userbiography.field_userbiography_value As user_biography FROM users users LEFT JOIN file_managed file_managed ON users.uid = file_managed.uid LEFT JOIN field_data_field_userbiography field_data_field_userbiography ON users.uid = field_data_field_userbiography.entity_id WHERE users.uid = '.$nrow->users_uid; $res1=db_query($userqry); // $row1=db_fetch_object($res1); foreach($res1 as $row1){ $path= str_replace('public:/','sites/default/files/',$row1->path); //$imgpath=$base_url.'/'.$path; echo "

".$row1->users_name."

".$row1->user_biography.""; echo '
'; } echo "

Articles in ".$termname."

"; $x=1; } echo "
".$nrow->term_data_name.""; if($nrow->node_comment_statistics_comment_count !=0) { echo '
'.$nrow->node_created.' | '. $nrow->node_comment_statistics_comment_count.'Comments
'; }else{ echo '
'.$nrow->node_created.'
'; } $node = node_load($nrow->nid); echo "
".render(field_view_field('node', $node, 'body', array( 'label'=>'hidden', 'type' => 'text_summary_or_trimmed', 'settings'=>array('trim_length' => 60), )))."
"; echo "
"; } } } ?>