Forums

[Plugin: User Community] Long user url's are possible (6 posts)

  1. johandemeijer
    Member
    Posted 3 years ago #

    It's possible for users to put a large url in their profile.

    http://img211.imageshack.us/img211/4843/naamloose.jpg

    Is is possible to shorten that url, so it's more like:

    http://www.teamibiza.net/fo...u=4590

    Thanks.

    Johan

  2. Txanny
    Member
    Posted 3 years ago #

    Will take that as a suggestion. And perhaps can embed in the plugin some system that provides short urls. Like tinyurl.com.

    Or perhaps provide a way to directly short the site url before displaying it. Thinking in laud perhaps set only a text on the page which links to the user site...

  3. cde010
    Member
    Posted 2 years ago #

    Yes, it is possible.

    Open: alkivia/templates/userlist-default.php

    Find:
    echo '<a href="'. $user['user_url'] .'" target="_blank">'. substr($user['user_url'], 7) . '</a>';

    Change to:
    echo '<a href="'. $user['user_url'] .'" target="_blank">'. substr($user['user_url'], 7, 24) . '</a>';

    This will limit the number of character displayed in the table without changing the link. Sorry you had to wait so long for an answer..

    Regards,
    Carl

  4. johandemeijer
    Member
    Posted 2 years ago #

    Thanks!
    How do I make a short url with three dots at the end?

    http://www.website.com/foru...

  5. cde010
    Member
    Posted 2 years ago #

    Not sure...I would like to know this too. Anyone?

  6. Txanny
    Member
    Posted 2 years ago #

    In the provided sample from cde10, just add the dots before the closing :

    echo '<a href="'. $user['user_url'] .'">'
         . substr($user['user_url'], 7, 24) . '...</a>';

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags