vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   shortening long links... (https://vborg.vbsupport.ru/showthread.php?t=55569)

Solice 07-24-2003 02:52 PM

shortening long links...
 
1 Attachment(s)
I was wondering if anyone could tell me how to have links past a certain # of characters be shrunk down in size to prevent this:

~please see attachment~

I've seen it on forums before... where the link ends up looking like this www.longasslink...blabla
thanks in advance for any help given ^^

Gary King 07-24-2003 06:51 PM

If you're talking about vBulletin's function, here is what it looks like:

PHP Code:

function dowordwrap($text) {
  global 
$wordwrap;

  if (
$wordwrap!=and $text!="") {
    return 
preg_replace("/([^\n\r ?&\.\/<>\"\\-]{".$wordwrap."})/i"," \\1\n",$text);
  }



Where $wordwrap is the number of letters before wrapping, and $text is the text to wrap.

Solice 07-25-2003 09:49 PM

Ok, I saw what your saying and it actually does it in the threads automatically... but what I really want to change is the way it displays them on the whos online... is there a way to do that or to make it so that the whos online can identify the articles section or others like it?

Gary King 07-26-2003 01:53 AM

What in tarnation are you talking about? (Just had to say it :p)

Solice 07-29-2003 01:56 AM

click on the attachment in the first post... see how the forums are stretched out by that link?

I want to keep that from happening...

Gary King 07-29-2003 02:32 AM

You mean the Unknown Location part? Only administrators see that anyways, so your members won't see that, they'll only see SoliceNet Main Index


All times are GMT. The time now is 01:42 AM.

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.00939 seconds
  • Memory Usage 1,718KB
  • 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_php_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