Hide file extension in display information cpg1.3 Hide file extension in display information cpg1.3
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

Hide file extension in display information cpg1.3

Started by spa2036, December 17, 2005, 01:07:48 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

spa2036

Hi you all,

For my project I need to hide the file extension which is displayed in the image display information. Unfortunately I could not find any posts or tricks to make this happen. While viewing an image the file name is standard displayed with the extension included. What I do need is only the filename without extension.
I know it has something to do with calculating characters in the filename string, remove the last four characters (dot and extension) and return the new name.

Does anyone know how to make this happen?

Thanks in advance.
Rob
Thanks for sharing this wonderful program

Abbas Ali

Edit displayimage.php

Replace (in function html_picinfo)


$info[$lang_picinfo['Filename']] = htmlspecialchars($CURRENT_PIC_DATA['filename']);


with


$info[$lang_picinfo['Filename']] = htmlspecialchars(substr($CURRENT_PIC_DATA['filename'], 0, strpos($CURRENT_PIC_DATA['filename'], '.')));
Chief Geek at Ranium Systems