X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   removing some text from this string (https://forum.x-cart.com/showthread.php?t=12935)

mpj 03-21-2005 09:57 AM

removing some text from this string
 
right now it is showing

/home/server/apple/html/files/t_327.jpg


how can I make it show just

files/t_327.jpg


i've tried truncate but thats from the end of the text

thanks for your help!

balinor 03-21-2005 01:48 PM

Please clarify...are you trying to remove that info from the URL or what??

Jon 03-21-2005 02:27 PM

If your doing this in a template, you have 2 options:

1) Using PHP in your templates. Replace "YOURSMARTYVARIABLE" with your variable.

Code:

{php}
$newvariable = $GLOBALS['smarty']->_tpl_vars['YOURSMARTYVARIABLE'];
echo str_replace($newvariable,"","/home/server/apple/html/");
{/php}


2) Use the PHP command str_replace by passing it as a modifier http://smarty.php.net/manual/en/api.register.modifier.php[/code]


All times are GMT -8. The time now is 03:50 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.