Results 1 to 3 of 3

Thread: creating links in a page from a list of keyword/href pairs

  1. #1
    Join Date
    Sep 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default creating links in a page from a list of keyword/href pairs

    I have a CMS for a small entertainment company. It has many pages of text content, changed frequently.

    I am looking for a piece of javascript that I can insert into the CMS pages, that parses the content of the page, looking for keywords, and when it finds a keyword, creates a hyperlink on that keyword. So.. for example, it searches for "Big Party 13" and creates a link around that text to href="bigparty13.html".

    It's something like IntelliTXT or the ContentLink (Kontera?) except I don't need a popup and it's not advertising related. I just need to create the links to simply the linking within the CMS.

    So... the script would have to include an editable list of keyword/href pairs.
    "Big Party 13", "bigparty13.html"

    Anyone seen anything like this? My javascript skills are not sufficient to program it... but I could probably modify an existing script that was close...

  2. #2
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    I suppose you can create "tags" to do this. You'll need to enter keywords yourself. Or, you can get PHP to search through your content (not recommended, 'cause it's slow)
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  3. #3
    Join Date
    Sep 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Yeah.. those are the two methods I don't want to use.

    Tagging requires the content creator to do it... no good... can't trust them to do it right! And the requirement is that the content creator won't have to.

    I don't want to parse the page server-side either, I want to do it with javascript.

    Parsing client-side seems a bit slow from the pages I've loaded with Kontera or Intellitxt code... but it works nice.

    I think I'll grab their code and try and tweak it for my purposes...

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
  •