PDA

View Full Version : How to shorten the display of a UserName?


JulianWolf
12-14-2007, 11:48 AM
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!

Marco van Herwaarden
12-15-2007, 06:48 AM
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.

Coders Shack
12-15-2007, 07:49 AM
This can be stopped via JS, CSS, or PHP

JulianWolf
12-16-2007, 07:18 AM
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!

Marco van Herwaarden
12-16-2007, 07:38 AM
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.

JulianWolf
12-31-2007, 04:08 AM
Ok, I will do that. Thank you. ;-)