vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   How to shorten the display of a UserName? (https://vborg.vbsupport.ru/showthread.php?t=165138)

JulianWolf 12-14-2007 11:48 AM

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:

Quote:

<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. ;-)


All times are GMT. The time now is 08:08 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00996 seconds
  • Memory Usage 1,719KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete