Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 14 Dec 2007, 12:48
JulianWolf JulianWolf is offline
 
Join Date: Apr 2006
How to shorten the display of a UserName?

Hi everybody,

I have a Hack installed (in vBadvance) that shows all Users that are online in a sidebox. This is done in the template with this code:

<div><a href="$vboptions[bburl]/member.php?$session[sessionurl]u=$onlinephoto[userid]">$onlinephoto[musername]</a></div>
Now sometimes the Username is to long and blows out the borders of the sidebox. So I would like to "shorten" the display in that case.

When the Username is for example "Imjustatestuserwithatoolongusername", then I would like to show only "Imjustates..." and still have it linked. Is there any way to do that?
Itīs really just "Shorten the username and put three dots at the end". Thatīs it. ;-)

Best wishes, Julian!
Reply With Quote
  #2  
Old 15 Dec 2007, 07:48
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
If you have questions/problems with a modification, then please post in the thread (or support forum/board) about that modification. Best chance to receive a reply from either the author or another member using the same modification.
__________________
Marco van Herwaarden
Ex vBulletin.org Coordinator
Reply With Quote
  #3  
Old 15 Dec 2007, 08:49
Coders Shack Coders Shack is offline
 
Join Date: Apr 2007
Real name: Chad Scira
This can be stopped via JS, CSS, or PHP
Reply With Quote
  #4  
Old 16 Dec 2007, 08:18
JulianWolf JulianWolf is offline
 
Join Date: Apr 2006
Hi Marco,

as in the caching-thread itīs not just to change it, itīs for me also to understand, how to do that.

So thanks Shack for your info. As far as I know, when I do it with php it means, i write a little script, that does it, and call the script in the spot on the template, right? Or can php directly be used in the template?

Best wishes, Julian!
Reply With Quote
  #5  
Old 16 Dec 2007, 08:38
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
As in the other thread, i don't know what is in the script you are using. Best is to ask this at the place where other users (and author?) of the same script will see the question and are able to respond.

PS The best place to handle this would be in the PHP script, although it might also be possible with CSS, but better ask in the design forums for assistence with that.
__________________
Marco van Herwaarden
Ex vBulletin.org Coordinator
Reply With Quote
  #6  
Old 31 Dec 2007, 05:08
JulianWolf JulianWolf is offline
 
Join Date: Apr 2006
Ok, I will do that. Thank you. ;-)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

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


New To Site? Need Help?

All times are GMT. The time now is 05:43.

Layout Options | Width: Wide Color: