"reptag_hj_figuretag('\\1','\\2','\\3','\\4');", "#{([RL])FIGURE:([0-9]*):([^:]+)}#e" => "reptag_hj_figuretag('\\1','\\2','\\3');", "#{([RL])FIGURE:([0-9]*)}#e" => "reptag_hj_figuretag('\\1','\\2');" ); } $reptags_info['hj'] = array(t('HJ Images (LFIGURE,RFIGURE)'), FALSE); $reptags_help['hj'] = array( '{LFIGURE:15}' => 'A floated div with image 15 in it, thumbnail size, linked to the full node', '{LFIGURE:15:sizename}' => 'A floated div with image 15 in it, sizename size, linked to the full node', '{LFIGURE:15:sizename:sizename2}' => 'A floated div with image 15 in it, sizename size, linked to a sizename2', '{RFIGURE....}' => 'same but floated right instead of left' ); function reptag_hj_figuretag($whichfloat,$imagenumber,$thumbsize='thumbnail',$fullsize='') { $result = ''; $imagefile = ''; $head = ''; $body = ''; $size = ''; $_node = node_load(array('nid' => $imagenumber)); if(isset($_node)) { $body = $_node->body; $head = $_node->title; foreach ($_node->images as $sizename=>$filename) { if($sizename == $thumbsize) { $imagefile = $filename; } } if($imagefile != '') { $imagefile = file_create_path($imagefile); if(file_exists($imagefile)) { $size = getimagesize($imagefile); $imgsize = $size[3]; } } } $result .= '
'; $result .= '