hi all,

i want to make a image as link.

and the code i have something is like this...

function simpleanswer_answers($op, $nid = NULL, $answercount = 0) {

switch($op) {
case 'answersinfo':
$info['simpleanswer'] = 'Simple Answer Response';
return $info;
break;
case 'answerbuttons':
if($answercount == 0) {
return user_access('create responses') ? l(t('Be the first to add an Answer'), 'node/add/simpleanswer/'. $nid, array('class' => 'postanswer')) : '';
}
else {
return user_access('create responses') ? l(t('Add an Answer'), 'node/add/simpleanswer/'. $nid, array('class' => 'postanswer')) : '';
}
break;

and continue.........

at 'Add an answer' i place a image but it is displaying as a simple image not as link and at the same time on hover i have to show another image what i have to do for that?

please help me by telling the code

thanks

Comments

kuldip zala’s picture

mm167’s picture

how u present (your theme?) the images?

u may add the url over there.

wla_g’s picture

Try:

l(theme_image(-path to image-,-info-,-info-,NULL,TRUE), -trarget url-, array('html' => TRUE));

That worked for me.

Regards
Werner

aflatoon’s picture

thanks!!!!