View Single Post
  #1  
Old 09-06-2010, 02:19 AM
  JeanB's Avatar 
JeanB JeanB is offline
 

eXpert
  
Join Date: Oct 2009
Location: Worcestershire, UK
Posts: 217
 

Default "Firstname, Lastname": Can you count characters?

Hi All,
I have a bar along the top of my site that tells you who's logged in.

Code:
{if $login eq "" } You are not logged in! <strong><a href="../error_message.php?need_login">[Login]</a></strong> {else} <strong>{if ($active_modules.Greet_Visitor ne "") AND ($smarty.cookies.GreetingCookie ne "")}{$smarty.cookies.GreetingCookie|replace:"\'":"'"}</strong> {/if} {$lng.txt_logged_in}<br /> {/if}

However, I only have a limited amount of space to fit a name in, before it starts overlapping something else.

I wondered if there was a way to count how many characters are in the person's name - If it's over a certain amount, only display their first name?

Thanks in advance,
Jean
__________________
4.2.3
X-Cart Gold
BCSE Address Book | XCartMods QuickFind | X-RMA | X-Offers
-------[installed]----------------------[installed]--------------[installed]----[installed]--



5: in development
Reply With Quote