BBCode Magic Links

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • eski007

    BBCode Magic Links

    I need to convert text in posts to clickable truncated links.

    i.e. https://www.domain.com/test/index.ph...123&test=13123

    in to <a href="www.domai n.com/test/index.php?
    com=123123&opti on=123123&test= 13123">www.doma in.com/test/....</a>


    I know how to convert links in to clickable links, but I don't know
    how to truncate (ShortenText) the URL too so it doesn't cause the
    screen to go funny.

    Thanks,
    Anthony

  • Jerry Stuckle

    #2
    Re: BBCode Magic Links

    eski007 wrote:
    I need to convert text in posts to clickable truncated links.
    >
    i.e. https://www.domain.com/test/index.ph...123&test=13123
    >
    in to <a href="www.domai n.com/test/index.php?
    com=123123&opti on=123123&test= 13123">www.doma in.com/test/....</a>
    >
    >
    I know how to convert links in to clickable links, but I don't know
    how to truncate (ShortenText) the URL too so it doesn't cause the
    screen to go funny.
    >
    Thanks,
    Anthony
    >
    >
    Anthony,

    Try alt.html. This has nothing to do with PHP - it's straight HTML
    scripting.

    --
    =============== ===
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    jstucklex@attgl obal.net
    =============== ===

    Comment

    • Rik Wasmus

      #3
      Re: BBCode Magic Links

      On Fri, 07 Mar 2008 18:20:30 +0100, eski007 <eski009@gmail. comwrote:
      I need to convert text in posts to clickable truncated links.
      >
      i.e. https://www.domain.com/test/index.ph...123&test=13123
      >
      in to <a href="www.domai n.com/test/index.php?
      com=123123&opti on=123123&test= 13123">www.doma in.com/test/....</a>
      >
      >
      I know how to convert links in to clickable links, but I don't know
      how to truncate (ShortenText) the URL too so it doesn't cause the
      screen to go funny.
      Play around with strlen() & substr().
      --
      Rik Wasmus

      Comment

      Working...