File names without extension

zidekl

No avatar

2009-04-08 23:10

Hi all,

I have some special question. I made image gallery. All I need to do for perfect gallery for me is display file names of images under thumbs without extension. Just what I wish to see under thums is PICTURE, not PICTURE.JPG.
I know there is description for displaying, but I have sometimes long description so I need exactly this:

line from pages_default.tpl:
<!-- BEGIN IMAGES_DESCRIPTION_1 --><div>$aData[sDescription]</div><!-- END IMAGES_DESCRIPTION_1 -->

I replaced it with:
<!-- BEGIN IMAGES_DESCRIPTION_1 --><div>$aData[sFileName]</div><!-- END IMAGES_DESCRIPTION_1 -->

I wish to replace it with:
<!-- BEGIN IMAGES_DESCRIPTION_1 --><div>something_what_stores_filename_without_extension</div><!-- END IMAGES_DESCRIPTION_1 -->

Maybe to create new variable or something...

Could you please help me?

Thank you very much

Libor

» Quick.Cms v2.x

zidekl

No avatar

2009-04-08 23:31

Oh yes, and please sorry for my terrible english:-)

treewood (OpenSolution)

Avatar: treewood

2009-04-09 07:49

edit core/files.php and find function listImagesByTypes
in this function find this:
if( !empty( $aData['sDescription'] ) ){

put after this:

$aData['sFileNameWithoutExt'] = $GLOBALS['oFF']->throwNameOfFile$aData['sFileName'] );

now you have to add variable $aData[sFileNameWithoutExt] to IMAGES_DESCRIPTION_1

zidekl

No avatar

2009-04-09 08:41

oh yessss, thats perfect 100% working solution

thank you very much treewood

Best regards

Libor

Back to top
about us | contact