Results 1 to 5 of 5

Thread: replace string to link

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2002
    Location
    www.mechboxer.de
    Posts
    15

    replace string to link

    hi!
    this time my question how I can replace a string into a link?
    the problem is:
    I'm doing a forum and has now disabled html with "htmlentities();"!
    But now I want, that the user also can format his post.

    perhaps this way:
    the user writes: [.U.R.L.=http://www.vbforums.com] //without the dots!
    and the post should be schown as:
    http://www.vbforums.com

    And even the way this forum is doing it:
    [.U.R.L.=http://www.vbforums.com]Click Me[./.U.R.L.] //also without the dots

    shown as:
    Click Me

    these are the two ways I'd like to put into my forum, but I've no idea how I could manage it...
    I hope you are able to help me!

    thanx a lot
    -=|www.mechboxer.de|=-

  2. #2
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    little lost here. you have a forum that uses htmlentities() to turn off html? and you want to circumvent this?

    to do what you want you would have to make various edits to the orignal script. it can take hours if you don't know how.

    what forum software are you using?

  3. #3
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Wait a minute...

    Is this a forum you're making or one you're trying to modify? If you're trying to modify one, then phpman is right. It could be hell trying to find the right stuff to modify/replace in the code.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  4. #4

    Thread Starter
    New Member
    Join Date
    Dec 2002
    Location
    www.mechboxer.de
    Posts
    15
    I got it...
    I am writing a forum - not trying to modify one...
    I did it with the preg_replace(); function.
    very easy
    -=|www.mechboxer.de|=-

  5. #5
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by Stylewriter
    I got it...
    I am writing a forum - not trying to modify one...
    I did it with the preg_replace(); function.
    very easy
    My evil laugh has a squeak in it.

    kristopherwilson.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width