Author Topic: Modifying {thumbnail} - How!  (Read 4595 times)

0 Members and 1 Guest are viewing this topic.

Offline webbug

  • Newbie
  • *
  • Posts: 33
    • View Profile
Modifying {thumbnail} - How!
« on: May 21, 2009, 05:13:24 PM »
I want to use random_image.html that shows the thumbs but without the additional text such as the comment, user and title and instead embedding the comment and title inside the image using "alt". 

This is the code:

Code: [Select]
{thumbnail} <br /><b>{image_name}</b>{if image_is_new} <sup class="new">{lang_new}</sup>{endif image_is_new}
<br />
{if allow_comments}{lang_comments} {image_comments}{endif allow_comments}<br />{user_name}

So I need to delete everything and leave only {thumbnail} but the question is how and from where I can modify thumbnail parameters?

Offline didoman

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: Modifying {thumbnail} - How!
« Reply #1 on: December 15, 2009, 03:20:58 AM »
Id also like to know where to do this. Searched but cant find anything on this.
I want to add title="xxx" into the {thumbnail} so firefox can pick up the tooltip as firefox does not tooltip alt

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: Modifying {thumbnail} - How!
« Reply #2 on: December 16, 2009, 12:28:30 AM »
didoman,

includes/functions.php

search for
Code: [Select]
      $thumb = "<img src=\"".$file_src."\" border=\"0\"".$width_height." alt=\"".format_text($image_name, 2)."\" />";
replace with
Code: [Select]
      $thumb = "<img src=\"".$file_src."\" border=\"0\"".$width_height." alt=\"".format_text($image_name, 2)."\" title=\"".format_text($image_name, 2)."\" />";
and

search for
Code: [Select]
      $thumb = "<img src=\"".$file_src."\" border=\"".$config['image_border']."\"".$width_height." alt=\"".format_text($image_name, 2)."\" />";
replace with
Code: [Select]
      $thumb = "<img src=\"".$file_src."\" border=\"".$config['image_border']."\"".$width_height." alt=\"".format_text($image_name, 2)."\" title=\"".format_text($image_name, 2)."\" />";
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline didoman

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: Modifying {thumbnail} - How!
« Reply #3 on: December 17, 2009, 07:24:25 AM »
Legend. Thanks Nicky. You make it look so easy  :D