Link on image title

  • phm2000
    Inactive member
  • Topic Author
  • New Member
  • New Member
More
12 years 11 months ago #7247 by phm2000
Link on image title was created by phm2000
Hello

I just wanted to know if it's possible to replace the link on the image by a link on the text "image title"

Thanks

Good job

Please Log in to join the conversation.

More
12 years 11 months ago #7259 by ivan.milic
Replied by ivan.milic on topic Re: Link on image title
You should be able to do that, but I can not give you precise instructions, because I do not quite understand what are you trying to swap.
Open
modules\mod_hot_image_slider\tmpl\default.php

You will see variables named like :$imageLinkArray,$imageTitleArray,$imageDescArray... you can just swap them.

Please Log in to join the conversation.

  • phm2000
    Inactive member
  • Topic Author
  • New Member
  • New Member
More
12 years 11 months ago #7275 by phm2000
Replied by phm2000 on topic Re: Link on image title
Hello

Thanks for your reply. I give you more informations
I want to do a link on the "image title" text instead of a link on the image. I don't find where I can do the change.
I suppose I have to move <a href="<?php echo $imageLinkArray[$imageCounter]; ?>" but I don't find where

Thanks

Please Log in to join the conversation.

More
12 years 11 months ago #7283 by ivan.milic
Replied by ivan.milic on topic Re: Link on image title
Hi,

that title is passed as javasctipt data object in JSON form (end of default.php)
jQuery widget than uses that data object to get that title form there and render it. Here is part of loop body where that JSON data item object is created:


...
<?php $imageSRC .= '{"id":"slide-img-'.$titleCounter.'","client":"'.$imageTitleArray[$titleCounter].'","desc":"'.$imageDescArray[$titleCounter].'"},'; ?>
....

a dough you can achieve that without changing javascript but you an try to pass markup along with plain text in title like this:

... .'<a href="'.$imageLinkArray[$titleCounter].'">'.$imageTitleArray[$titleCounter].'</a>'. ...

Please Log in to join the conversation.

  • phm2000
    Inactive member
  • Topic Author
  • New Member
  • New Member
More
12 years 11 months ago #7296 by phm2000
Replied by phm2000 on topic Re: Link on image title
Hi

Thanks for your reply, but I'm sorry, I don't understand where I have to put this .'<a href="'.$imageLinkArray[$titleCounter].'">'.$imageTitleArray[$titleCounter].'</a>'.

Could you help me one more time

For SEO it's better to do a link on text instead of on an image

Thanks

Please Log in to join the conversation.

More
12 years 11 months ago #7317 by ivan.milic
Replied by ivan.milic on topic Re: Link on image title
...

<?php $imageSRC .= '{"id":"slide-img-'.$titleCounter.'","client":"'.'<a href="'.$imageLinkArray[$titleCounter].'">'.$imageTitleArray[$titleCounter].'</a>'.'","desc":"'.$imageDescArray[$titleCounter].'"},'; ?>

....

But note that this will only maybe work.

Please Log in to join the conversation.

Time to create page: 0.321 seconds
Powered by Kunena Forum