general ideas for making this work

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
deltawing
Forum Commoner
Posts: 46
Joined: Tue Jun 14, 2005 2:55 pm

general ideas for making this work

Post by deltawing »

Sorry if this isn't the right place to put this. I wasn't sure because its more about general structure and ideas than anything specific.

I'm trying to build a site that works in a fairly similar way to wikipedia. Its on a specific subject, and has some major differences from wikipedia, but that's not really relevant.

The problem I've come up with is getting links to be automatically generated within the text of articles to other articles. For example, if somebody mentions an name, say, Gavin Friday, does anyone have any ideas on how I can make that text link to the article on Gavin Friday? I have thought that people could surround any text that there may (either at present or in future) be an article on in some special characters (such as <<Gavin Friday>>) when they write the article, then that could be converted into a link to my search page, which would hopefully redirect to the article immediately, but the problem with that is, a page could be full of links which just bring up no matches.

Any ideas would be much appreciated.

Nathan.
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Post by malcolmboston »

[pseudo code]
create an array of keywords
parse document
do a str_replace on keywords
output parsed document
[/pseudo code]
deltawing
Forum Commoner
Posts: 46
Joined: Tue Jun 14, 2005 2:55 pm

Post by deltawing »

yeah, thanks for that, but the problem is not knowing what the keywords are! If I do that for all the articles in the database, what about when new articles get added? How can the existing articles show links to articles created after them. The only thing I have thought of is having a script run periodically (ie. me running it every few days), to do what you've suggested for each of the articles in turn, but that's hardly ideal.
Post Reply