Page 1 of 1

Remove file extension in v. 4.1

Posted: Mon Apr 30, 2012 6:46 pm
by acymru
I'd like to remove the file extension from the image caption. I tried replacing

Code: Select all

$this->descArray[$f] = $f;
with

Code: Select all

$this->descArray[$f] = ag_removExtension($f);
in agGallery.php as described in this forum post for the Joomla 1.5 version:
http://www.vasiljevski.com/forum/viewto ... f=20&t=319
but I get the error
Fatal error: Call to undefined function ag_removExtension()
with a line # reference to the line in agGallery.php containing the changed code.

Any tips?

Thank you

Re: Remove file extension in v. 4.1

Posted: Tue May 01, 2012 2:12 pm
by Vasiljevski
Try using

Code: Select all

$this->descArray[$f] = agHelper::ag_removExtension($f)
Because "ag_removExtension($f)" is defined in a class agHelper and we access the methods statically from it :)

Re: Remove file extension in v. 4.1

Posted: Tue May 01, 2012 9:45 pm
by acymru
Perfect. Thank you very much.

Re: Remove file extension in v. 4.1

Posted: Sun Sep 09, 2012 3:59 pm
by ParakasaLomo
Thank you. This fixed the issue for me :D