NYCPHP Meetup

NYPHP.org

[nycphp-talk] Dynamically Add Links to Text

Andrew Muraco amuraco at gmail.com
Thu Aug 27 16:16:20 EDT 2009


But you have to consider that chances are, the person entering the article
won't select all the possible keywords that could become links ahead of
time, so you'd end up with articles that don't have enough links.. but I
like the idea.

Personally, i think a spider/bot is the best bet, maintain a list of
phrases/words that should point to links and add those in.

Alternately, when a new article gets created search for all the articles
that might need a reference to it and ask the user to select which ones to
process (automagically add links to the new article) (avoids the time gap of
a bot)

On Thu, Aug 27, 2009 at 4:10 PM, Michael Southwell <
michael.southwell at nyphp.com> wrote:

> Glenn Powell wrote:
>
>> Ah. New article titles are based on phrases from pre-existing content.
>>
>
> I'll bet you could pre-create most of the links every time you write an
> article. I mention Valley Forge, I think "there should be an article on that
> some day", and so I create the link right then. When the article is
> displayed, you check to see whether the target exists; if it does, you
> display the link; if it doesn't, you display the text without the link. That
> could at least make things easier in the future (maybe).
>
>
> --
> =================
> Michael Southwell
> Vice President, Education
> NYPHP TRAINING:  http://nyphp.com/Training/Indepth
>
> _______________________________________________
> New York PHP User Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> http://www.nyphp.org/show_participation.php
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20090827/88c7ee1d/attachment.html>


More information about the talk mailing list