View Single Post
  #2  
Old 07-23-2003, 10:39 AM
  kpayne's Avatar 
kpayne kpayne is offline
 

X-Adept
  
Join Date: Dec 2002
Location: Firetanksoftware.com
Posts: 469
 

Default

I couldn't find a smarty modifier to do this automatically, so here's the plan:

In your smarty.php file, add this code:

Code:
$smarty->register_modifier("substr", "substr");

Right above this line:

Code:
$mail_smarty = $smarty;

Then in your templates, you can say:

Code:
{$code|substr:1,1}

Remeber that the 1st character of a string is in position 0 so the 2nd character is in position 1.

Hope this helps!

(This is untested, BTW)
__________________
X-cart Featured Products Manager from http://www.firetanksoftware.com - Put your products where you want, how you want.
Reply With Quote