Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

removing some text from this string

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-21-2005, 09:57 AM
 
mpj mpj is offline
 

Senior Member
  
Join Date: Feb 2005
Posts: 106
 

Default 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!
__________________
X-Cart 4.0.11


{My simple mods}
Adding Market list and % save on product detail
Quantity input box
Reply With Quote
  #2  
Old 03-21-2005, 01:48 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Please clarify...are you trying to remove that info from the URL or what??
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 03-21-2005, 02:27 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

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]
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

   

 
X-Cart forums © 2001-2020