* User Info

Welcome, Guest. Please login or register.

* Recent Posts

Forum closed by whazzup
[September 25, 2021, 02:56:14 PM]

How do i replace an image file with another image file by Malu
[December 16, 2020, 03:17:02 PM]

Can't get RSG "Show My Galleries" to work by Dampfnudel
[February 25, 2019, 11:01:55 AM]

Change the order of uploaded images in the gallery by whazzup
[February 19, 2019, 10:37:29 PM]

Upload timeout for large galleries (500 images each) by whazzup
[February 11, 2019, 10:07:25 PM]

Greetings from Ronald Smit by whazzup
[January 06, 2019, 03:39:22 PM]

Pluign and module by whazzup
[June 08, 2018, 11:57:13 PM]

Version 4.4.1 released by whazzup
[May 31, 2018, 04:31:16 PM]

Author Topic: Shorter Filename in EXIF info?  (Read 3168 times)


  • Guest
Shorter Filename in EXIF info?
« on: October 29, 2012, 07:16:39 PM »
Hello, not really sure what forum this should go in..

System Info:
Database Version:    5.1.38
PHP Version:    5.2.9
Web Server:    Apache/2.2.20 (CentOS)
Web Server to PHP interface:    apache2handler
Joomla! Version:    Joomla! 1.5.18 Stable (Not most recent I know!)

Installed RSGallery2 version:   2.3.0 (SVN 1097)
Installed Site Template: Juli (downloaded from

Okay, so, the person I am doing this gallery for would like a shortened version of the FileName path in the EXIF info. They feel that the whole path is not necessary for their use and would rather just know the exact file name and type (IE simpy: image.jpg). The red boxed out part shown below is what I would like to accomplish:

I am unsure if there is a way in PHP that the path could be cut down to only the part I need or if I could capture this info another way..


Offline mirjam

  • Retired from Dev Team
  • Hero Member
  • ****
  • Posts: 670
Re: Shorter Filename in EXIF info?
« Reply #1 on: October 30, 2012, 10:02:59 AM »
Find the file /JOOMLAROOT/components/com_rsgallery2/lib/exifreader/exifReader.php where in function getImageInfo you'll see on line 1608
Code: [Select]
$retArr["FileName"] = $imgInfo["FileName"];
Change that to
Code: [Select]
$retArr["FileName"] = basename($imgInfo["FileName"]);
to get just the filename (see

Keep a note of what you've changed since this change will be overwritten if you ever reinstall/update RSGallery2.

This change can be applied for both RSGallery2 version 2.3.0 for Joomla 1.5 and version 3.2.0 for Joomla 2.5.

With a little boy in the house I don't spend as much time on RSG2 anymore.

I still like RSG2, if you do too, please think about how you can invest some of your time in RSG2... the one remaining coding volunteer (Whazzup) can use your help!


  • Guest
Re: Shorter Filename in EXIF info?
« Reply #2 on: October 30, 2012, 05:48:12 PM »
Awesome, thank you much! I was trying to see if there was a PHP function that did that.

Your support has been great!