Author Topic: lange Dateinamen kürzen/cut long filenames  (Read 5927 times)

0 Members and 1 Guest are viewing this topic.

Offline Dr_Freud76

  • Pre-Newbie
  • Posts: 3
    • View Profile
lange Dateinamen kürzen/cut long filenames
« on: November 19, 2007, 11:04:05 PM »
Hallo,

ich suche eine Möglichkeit das wenn man zu einem Bild einen langen Dateinamen schreibt, dieser bei den Thumbnails gekürzt angezeigt wird.
Also wenn das Bild "Palme mit Kokosnuss in der Südsee" heißt, das unter dem Thumb nur mehr steht "Palme mit Koko..." und wenn es neu ist dass es dann nochmals drei Buchstaben weniger sind, als "Palme mit K...new". Warum? Damit nicht das ganze Layout verschoben wird.
Sollte eine "einfache" if then else anweisung sein. Nur wo muss ich diese anbringen?

english
Hi, i'm looking for a solution to cut long filenames under a thumb. Like the filename ist "palm with coconut at the south seas" under the tumb it should be "palm with coco..." an if the picture is new too, it should be 3 letters less like "palm with c...new" Why? So that the whole layout will not be shifted.
Should be a "simple" if then else tag, but i dont know where to change.

Thanks
Armin

Offline mawenzi

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: lange Dateinamen kürzen/cut long filenames
« Reply #1 on: November 19, 2007, 11:15:04 PM »
... die "einfache" if ... else Anweisung musst du in der includes/functions.php vornehmen ...
... in etwa hier ... "image_name" => format_text($image_row['image_name'], 2), ... und davor ...
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 ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: lange Dateinamen kürzen/cut long filenames
« Reply #2 on: November 19, 2007, 11:23:37 PM »
E.g for cut long filename with max chars: http://www.4homepages.de/forum/index.php?topic=12772.0
For change image_name: includes/functions.php file (show image function).
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?