Author Topic: Name below the thumbnails  (Read 3716 times)

0 Members and 1 Guest are viewing this topic.

Offline fermachado

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
Name below the thumbnails
« on: April 17, 2009, 10:28:51 PM »
Hi,

Need your help!please.

I have a problem whit the big names below the thumbnails.You can see a example in the image attached.

How, I can limit the number of characters (photo name)to show below the thumbnail.

For example, it's possible show a short name below the thumbnail and show the full name in the details below the photo.

Sorry my english,

 Greetings from Portugal :D
www.globalfoto.net

Sintra - Portugal

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Name below the thumbnails
« Reply #1 on: April 18, 2009, 02:26:32 AM »
you can try add a new field and store short name in there:
[TUT] Zusätzliches Image Feld anlegen / Additional Image Field

or display only NN number of letters from the name by doing the following:

in includes/functions.php find:
    "image_name" => format_text($image_row['image_name'], 2),
Insert below:
    "image_name_short" => format_text(((strlen($image_row['image_name']) > 20) ? substr($image_row['image_name'], 020)."..." $image_row['image_name']), 2),


then in thumbnail_bit.html template use {image_name_short} tag. if image name is longer then 20 letters (spaces included) then it will show only first 20 letters.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline fermachado

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
Re: Name below the thumbnails
« Reply #2 on: April 18, 2009, 06:14:38 PM »
Hi Vano,

Thanks for your help,

I go tried this.


www.globalfoto.net

Sintra - Portugal

Offline fermachado

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
Re: Name below the thumbnails
« Reply #3 on: April 20, 2009, 09:36:54 AM »
Hi Vano,

Works very fine. :)

Thanks
Fernando
www.globalfoto.net

Sintra - Portugal