Mam taki oto kod:
Jak zrobić, żeby generując $photo->filename skrypt kasował mi cztery ostatnie znaki.
Teraz pokazuje mi się cała nazwa pliku, razem z rozszerzeniem. Kasując 4 ostatnie znaki zniknie akurat rozszerzenie.
Proszę o pomoc.
<img class="sigFreeImg" src="<?php echo $transparent; ?>" alt="<?php echo JText::_('JW_PLG_SIG_CLICK_TO_ENLARGE_IMAGE').' '.[color="#FF0000"]$photo->filename[/color]; ?>" title="<?php echo JText::_('JW_PLG_SIG_CLICK_TO_ENLARGE_IMAGE').' '.$photo->filename; ?>" style="width:<?php echo $photo->width; ?>px;height:<?php echo $photo->height; ?>px;background-image:url(<?php echo $photo->thumbImageFilePath; ?>);" />
Całość pliku:
<?php // no direct access ?> <?php foreach($gallery as $count=>$photo): ?> <li class="sigFreeThumb"> <a href="<?php echo $photo->sourceImageFilePath; ?>" class="sigFreeLink<?php echo $extraClass; ?>" style="width:<?php echo $photo->width; ?>px;height:<?php echo $photo->height; ?>px;" rel="<?php echo $relName; ?>[gallery<?php echo $gal_id; ?>]" title="<?php echo JText::_('JW_PLG_SIG_YOU_ARE_VIEWING').' '.$photo->filename; ?>" target="_blank"<?php echo $customLinkAttributes; ?>> <img class="sigFreeImg" src="<?php echo $transparent; ?>" alt="<?php echo JText::_('JW_PLG_SIG_CLICK_TO_ENLARGE_IMAGE').' '.$photo->filename; ?>" title="<?php echo JText::_('JW_PLG_SIG_CLICK_TO_ENLARGE_IMAGE').' '.$photo->filename; ?>" style="width:<?php echo $photo->width; ?>px;height:<?php echo $photo->height; ?>px;background-image:url(<?php echo $photo->thumbImageFilePath; ?>);" /> </a> </li> <?php endforeach; ?> <li class="sigFreeClear"> </li> </ul> <?php if($itemPrintURL): ?> <div class="sigFreePrintMessage"> <br /> </div> <?php endif; ?>