SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict Banana Man's Avatar
    Join Date
    Dec 2005
    Posts
    391
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Cross link my articles

    Hi,

    I want to run a script that will automatically link to other parts of my site if a specified word or phrase appears in an article i upload. Does anyone know where i could find out how to do something like this, i dont even know what something like this is called so not having much luck with google.

    Thanks

  2. #2
    SitePoint Wizard holmescreek's Avatar
    Join Date
    Mar 2001
    Location
    Northwest Florida
    Posts
    1,707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is a good article about creating hilights and links on keywords found in a search.

    http://www.alistapart.com/articles/searchhighlight

    I would think that you would create a db table like so id, word, url, then when you search you would simply highlight and link the word on the page by embedding a href tag set to the value of url from the table ...
    intragenesis, llc professional web & graphic design

  3. #3
    SitePoint Addict Banana Man's Avatar
    Join Date
    Dec 2005
    Posts
    391
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Interesting article, i might look into installing that too at sometime, doesn't seem to taxing. I'm still at a loss as to how to go about sorting the cross linking problem. I was thinking of using preg replace but i dont know how to go about implementing the rest.


Bookmarks

Posting Permissions

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