Database Results Riddle

Discussion in 'HTML' started by magmike, Aug 5, 2004.

  1. magmike

    magmike Guest

    We are discussing www.netterweb.com/articles/

    Upon visiting this page, hitting the "Search" link, and then using a
    keyword, such as "travel", to search, then clicking on a link to view the
    article, database results are shown. However, within the text, when a link
    is displayed, it is not active, and when copied over to Word, or an email,
    the links do not become active.

    My users have complained about this, yet I do not know how to ensure that
    links within the fields become active when displayed within a "memo" field
    in HTML results.

    Can anyone help me with this?

    Thanks in advance,
    Mike
    magmike, Aug 5, 2004
    #1
    1. Advertising

  2. *magmike* wrote:
    > We are discussing www.netterweb.com/articles/
    >
    > Upon visiting this page, hitting the "Search" link, and then using a
    > keyword, such as "travel", to search, then clicking on a link to view
    > the article, database results are shown. However, within the text,
    > when a link is displayed, it is not active, and when copied over to
    > Word, or an email, the links do not become active.


    Help us to help you, please post a direct link to a page exhibiting the
    problem - I got lost at the end of your directions and didn't find an
    example of the problem you're describing.
    --
    Andrew Urquhart
    - Alt.HTML FAQ: www.html-faq.com
    - Contact me: http://andrewu.co.uk/contact/
    - Apologies for the wrong timestamp on my post - blame my ISP
    Andrew Urquhart, Aug 5, 2004
    #2
    1. Advertising

  3. [follow-up set to news:alt.html]

    While the city slept, magmike (mike.kline@***nospam***netterweb.com)
    feverishly typed...

    > We are discussing www.netterweb.com/articles/


    May be better if we discuss http://www.netterweb.com/articles/ as some
    newsreaders won't render an address as a link without the protocol being
    specified.

    > Upon visiting this page, hitting the "Search" link, and then using a
    > keyword, such as "travel", to search, then clicking on a link to view
    > the article, database results are shown. However, within the text,
    > when a link is displayed, it is not active

    [...]

    Not sure what problem you are having here. I followed your instructions, and
    links (eg, "Editor Email", "Info Link") are indeed active links. Maybe you
    would care to elaborate further?

    Cheers,
    Nige

    --
    Nigel Moss
    http://www.nigenet.org.uk
    Mail address not valid. , take the DOG. out!
    In the land of the blind, the one-eyed man is very, very busy!
    nice.guy.nige, Aug 5, 2004
    #3
  4. Mike:
    One way to do this is to put the content of the Memo field in as HTML in
    your database, and then in FrontPage, right-click on the field in Normal
    View and check the box that says "column contains HTML".

    --
    ~ Kathleen Anderson
    Microsoft MVP - FrontPage
    Spider Web Woman Designs
    http://www.spiderwebwoman.com/resources/


    magmike <mike.kline@***nospam***netterweb.com> wrote:
    > We are discussing www.netterweb.com/articles/
    >
    > Upon visiting this page, hitting the "Search" link, and then using a
    > keyword, such as "travel", to search, then clicking on a link to view
    > the article, database results are shown. However, within the text,
    > when a link is displayed, it is not active, and when copied over to
    > Word, or an email, the links do not become active.
    >
    > My users have complained about this, yet I do not know how to ensure
    > that links within the fields become active when displayed within a
    > "memo" field in HTML results.
    >
    > Can anyone help me with this?
    >
    > Thanks in advance,
    > Mike
    Kathleen Anderson [MVP - FP], Aug 6, 2004
    #4
  5. magmike

    magmike Guest

    > One way to do this is to put the content of the Memo field in as HTML in
    > your database


    How do I do this when using Access? The title of the field, by the way, is
    "article" and it is set as a "memo" field.

    Mike
    magmike, Aug 6, 2004
    #5
  6. magmike

    magmike Guest

    > Help us to help you, please post a direct link to a page exhibiting the
    > problem....<blabber snipped>


    direct link: http://www.netterweb.com/articles/fulllisting.asp?ID=3592

    In the "article" section, and in the "reference box" section, there are very
    often links mingled in with the text. As you will see in this example, the
    links do not display active.
    magmike, Aug 6, 2004
    #6
  7. magmike

    magmike Guest

    > Not sure what problem you are having here. I followed your instructions,
    and
    > links (eg, "Editor Email", "Info Link") are indeed active links. Maybe you
    > would care to elaborate further?


    If you were viewing "editor email" links, you were looking in the wrong
    database (and did not follow my directions very well). My article listings
    are in question here. The field in which users paste in their cleverly
    crafted (and some not-so-clevely-crafted) article text, is simply titled,
    [article]. When the database results generate on the web page, web site
    links and email links within the text are not active. I would like to
    rectify that.

    Direct link to example:
    http://www.netterweb.com/articles/fulllisting.asp?ID=3592

    > While the city slept, magmike (mike.kline@***nospam***netterweb.com)
    > feverishly typed...


    7:30 AM (EST) is hardly city sleeping time - unless you are a vampire.
    [wink]

    > May be better if we discuss http://www.netterweb.com/articles/ as some
    > newsreaders won't render an address as a link without the protocol being


    Picky, picky. If you aren't smart enough to figure the link out, you
    probably can't help me on this issue. [smirk]


    > Cheers,


    Back at ya.

    Mike
    magmike, Aug 6, 2004
    #7
  8. magmike

    rf Guest

    magmike wrote

    Just in case you happen to visit alt.html:

    The crosspost to that frontpage group has precluded me from giving you the
    answer you require. The group is not on my server and in any case I would
    never post (even cross) to a frontpage group.

    --
    Cheers
    Richard.
    rf, Aug 6, 2004
    #8
  9. magmike

    Dave Patton Guest

    "magmike" <mike.kline@***nospam***netterweb.com> wrote in
    news::

    >> Not sure what problem you are having here. I followed your
    >> instructions,

    > and
    >> links (eg, "Editor Email", "Info Link") are indeed active links.
    >> Maybe you would care to elaborate further?

    >
    > If you were viewing "editor email" links, you were looking in the
    > wrong database (and did not follow my directions very well). My
    > article listings are in question here. The field in which users paste
    > in their cleverly crafted (and some not-so-clevely-crafted) article
    > text, is simply titled, [article]. When the database results generate
    > on the web page, web site links and email links within the text are
    > not active. I would like to rectify that.


    Then fix your server code.

    >> May be better if we discuss http://www.netterweb.com/articles/ as
    >> some newsreaders won't render an address as a link without the
    >> protocol being

    >
    > Picky, picky. If you aren't smart enough to figure the link out, you
    > probably can't help me on this issue. [smirk]


    Stop being an ass if you want people to help you.
    Given that you can't figure out that your problem is
    an ASP problem, and that you should be asking for
    help in an ASP-related newsgroup, it's hardly wise
    for you to be complainging about a reply that
    correctly pointed out a problem with how you
    included a URL.

    --
    Dave Patton
    Canadian Coordinator, Degree Confluence Project
    http://www.confluence.org/
    My website: http://members.shaw.ca/davepatton/
    Dave Patton, Aug 6, 2004
    #9
  10. I copy the text into a new page in FrontPage, which applies the HTML tags,
    and then from FrontPage into the memo field in the database.

    Check out this page for an example of the results page:
    http://www.cthealthpolicy.org/cthealthnotes/currentissue.asp

    --
    ~ Kathleen Anderson
    Microsoft MVP - FrontPage
    Spider Web Woman Designs
    http://www.spiderwebwoman.com/resources/


    magmike <mike.kline@***nospam***netterweb.com> wrote:
    >> One way to do this is to put the content of the Memo field in as
    >> HTML in your database

    >
    > How do I do this when using Access? The title of the field, by the
    > way, is "article" and it is set as a "memo" field.
    >
    > Mike
    Kathleen Anderson [MVP - FP], Aug 6, 2004
    #10
  11. "magmike" <mike.kline@***nospam***netterweb.com> wrote in message news:<>...
    > We are discussing www.netterweb.com/articles/
    >
    > Upon visiting this page, hitting the "Search" link, and then using a
    > keyword, such as "travel", to search, then clicking on a link to view the
    > article, database results are shown. However, within the text, when a link
    > is displayed, it is not active, and when copied over to Word, or an email,
    > the links do not become active.
    >
    > My users have complained about this, yet I do not know how to ensure that
    > links within the fields become active when displayed within a "memo" field
    > in HTML results.
    >
    > Can anyone help me with this?


    Presumably people are just entering the URL as plain text without the
    markup that's required top make the text a link. You'll need to
    modify your server-side code to scan the content of the memo field for
    linkable content and modify it before it's returned to the browser.
    Simple starting some text with http:// doesn't make that text a link -
    someone has to do some work for that to happen.

    Could the search be any slower, by the way? The search for "travel",
    over an 8meg connection, took 19 seconds. Time to upgrade to MySQL
    and PHP, I reckon.

    --
    Hywel
    Hywel Jenkins, Aug 6, 2004
    #11
  12. magmike

    magmike Guest

    To manually copy over 6,000 articles would be beyond desire. And to
    continually do so for the 200 or so articles that are posted to the database
    every week is also undesirable. This is at least what I understand you are
    telling me to do.

    See this example page (outside of the frames):
    http://www.netterweb.com/articles/fulllisting.asp?ID=3592

    What I am looking for is - Is there a tag that I can enclosed my database
    results code in that will turn any apparent link into a live, clickable one?
    magmike, Aug 6, 2004
    #12
  13. magmike

    magmike Guest

    > You'll need to modify your server-side code....

    So what do I do on the server side to make that happen?

    > Could the search be any slower....


    Probably not. I am unhappy with it, too, however, this is a hobby site that
    is hosted for $10/mo. To upgrade to MySQL would jump my monthly cost
    considerably. Also, I am not familiar with MySQL and how to manage it. My
    guess is, that I could no longer use the Database wizards inside FrontPage
    if I upgrade my data to it. Is that right?

    I do have DreamWeaver, but haven't spent much time with it. That would
    likely be a better program for managing MySQL driven ASP pages.

    Mike
    magmike, Aug 6, 2004
    #13
  14. The only thing I can think of would be to write an Access macro that would
    turn the text that begins with http into a real hyperlink, like this:

    <a
    href="http://www.cheap--airline--tickets.com">http://www.cheap--airline--tic
    kets.com</a>

    But you would still be left with the issue of line breaks - you could try
    the tweak here:
    http://home.att.net/~codelibrary/FrontPage/tweaks.htm#Line Breaks (note
    that the <br/ should really be <br/>.

    --

    ~ Kathleen Anderson
    Microsoft FrontPage MVP
    Spider Web Woman Designs
    http://www.spiderwebwoman.com/resources/



    magmike <mike.kline@***nospam***netterweb.com> wrote:
    > To manually copy over 6,000 articles would be beyond desire. And to
    > continually do so for the 200 or so articles that are posted to the
    > database every week is also undesirable. This is at least what I
    > understand you are telling me to do.
    >
    > See this example page (outside of the frames):
    > http://www.netterweb.com/articles/fulllisting.asp?ID=3592
    >
    > What I am looking for is - Is there a tag that I can enclosed my
    > database results code in that will turn any apparent link into a
    > live, clickable one?
    Kathleen Anderson [MVP - FrontPage], Aug 6, 2004
    #14
  15. magmike

    Adrienne Guest

    Gazing into my crystal ball I observed "magmike"
    <mike.kline@***nospam***netterweb.com> writing in
    news::

    >> You'll need to modify your server-side code....

    >
    > So what do I do on the server side to make that happen?
    >


    'this function replaces code

    for each word in split(memofield," ")
    if instr(word,"http://") > 0 then
    replace(word,"http://",<a href=" & chr(034) & word & chr(034) &
    ">" & word & "</a>"
    elseif instr(word,"www") > 0 and left(word,7) <> "http://" then
    replace(word,"www","<a href=" &chr(034) & "http://" & word & &
    chr(034) & ">" & word & "</a>"
    end if
    next

    'not tested, you might have to play with it

    >> Could the search be any slower....

    >
    > Probably not. I am unhappy with it, too, however, this is a hobby site
    > that is hosted for $10/mo. To upgrade to MySQL would jump my monthly
    > cost considerably. Also, I am not familiar with MySQL and how to manage
    > it. My guess is, that I could no longer use the Database wizards inside
    > FrontPage if I upgrade my data to it. Is that right?
    >
    > I do have DreamWeaver, but haven't spent much time with it. That would
    > likely be a better program for managing MySQL driven ASP pages.
    >


    Frankly, I would get away from using Frontpage altogether. Go to W3schools
    and do some of the SQL and ADO tutorials. Then get a plain text editor,
    and get WinSQl lite, that will let you run queries against Access or other
    types of databases.



    --
    Adrienne Boswell
    Please respond to the group so others can share
    http://www.arbpen.com
    Adrienne, Aug 6, 2004
    #15
  16. While the city slept, magmike (mike.kline@***nospam***netterweb.com)
    feverishly typed...

    >> Not sure what problem you are having here. I followed your
    >> instructions, and links (eg, "Editor Email", "Info Link") are indeed
    >> active links. Maybe you would care to elaborate further?

    >
    > If you were viewing "editor email" links, you were looking in the
    > wrong database (and did not follow my directions very well).


    Funny. I followed your "instructions" to the letter. I went to the address
    you gave, clicked on the "Search" link, entered "travel" as a keyword, then
    clicked on one of the links that came up. Exactly as you described the
    process. Not my fault if your navigation is screwed up by having two
    "search" links that go to different places. Consider changing this.

    > My article listings are in question here. The field in which users paste
    > in their cleverly crafted (and some not-so-clevely-crafted) article
    > text, is simply titled, [article]. When the database results generate
    > on the web page, web site links and email links within the text are
    > not active. I would like to rectify that.


    That would be because they are text, not links. Do as Hywel suggested and
    use a script to parse the text for possible links. As for your server, $10 /
    month and you don't get MySQL? My hosting costs far less than that and comes
    with MySQL, PHP, etc, etc. If you're nice to me in your next post, I might
    tell you who they are! ;-) And BTW, MySQL aint that hard to learn really, at
    least not for simple database queries.

    > http://www.netterweb.com/articles/fulllisting.asp?ID=3592


    Might have been a good idea if you posted that in the first place, but at
    least you are including the http:// bit now. ;-)

    >> May be better if we discuss http://www.netterweb.com/articles/ as
    >> some newsreaders won't render an address as a link without the
    >> protocol being

    >
    > Picky, picky. If you aren't smart enough to figure the link out, you
    > probably can't help me on this issue. [smirk]


    Oh I knew it was a URL alright, and my newsreader also turned it into a link
    for me. But the point is that some newsreaders won't. The issue then is
    *not* whether someone can "figure the link out", but whether they can be
    arsed to highlight it, copy it, open a browser, paste the URL into the
    address bar and click "Go", when all that can be avoided if you include the
    protocol when you supply a URL.

    Cheers,
    Nige

    --
    Nigel Moss
    http://www.nigenet.org.uk
    Mail address not valid. , take the DOG. out!
    In the land of the blind, the one-eyed man is very, very busy!
    nice.guy.nige, Aug 7, 2004
    #16
  17. magmike

    Toby Inkster Guest

    magmike wrote:

    > However, within the text, when a link is displayed, it is not active,
    > and when copied over to Word, or an email, the links do not become
    > active.


    Recently I have mostly been using...

    <?php
    /**
    NAME : autolink()
    VERSION : 1.0
    AUTHOR : J de Silva
    DESCRIPTION : returns VOID; handles converting
    URLs into clickable links off a string.
    TYPE : functions
    ======================================*/

    function autolink( &$text, $target='_blank' )
    {
    // grab anything that looks like a URL...
    $urls = _autolink_find_URLS( $text );
    if( !empty($urls) ) // i.e. there were some URLS found in the text
    {
    array_walk( $urls, '_autolink_create_html_tags', $target );
    $text = strtr( $text, $urls );
    }
    }

    function _autolink_find_URLS( $text )
    {
    // build the patterns
    $scheme = '(http:\/\/|https:\/\/)';
    $www = 'www\.';
    $ip = '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}';
    $subdomain = '[-a-z0-9_]+\.';
    $name = '[a-z][-a-z0-9]+\.';
    $tld = '[a-z]+(\.[a-z]{2,2})?';
    $the_rest = '\/?[a-z0-9.-_\/~#&=;%+?]+[a-z0-9\/#=?]{1,1}';
    $pattern = "$scheme?(?(1)($ip|($subdomain)?$name$tld)|($www$name$tld))$the_rest";

    $pattern = '/'.$pattern.'/is';
    $c = preg_match_all( $pattern, $text, $m );
    unset( $text, $scheme, $www, $ip, $subdomain, $name, $tld, $the_rest, $pattern );
    if( $c )
    {
    return( array_flip($m[0]) );
    }
    return( array() );
    }

    function _autolink_create_html_tags( &$value, $key, $target='' )
    {
    # if( $target )
    # $target = " target=\"$target\"";
    $value = "<a href=\"$key\">$key</a>";
    }

    ?>


    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
    Now Playing ~ ./brendan_benson/lapalco/08_eventually.ogg
    Toby Inkster, Aug 8, 2004
    #17
  18. magmike

    magmike Guest

    I'm not very familiar with PHP - is this a seperate file on the server - or
    is it included in the code of the actuall page returning the database
    results?

    Mike
    (Thanks by the way for the info!)
    magmike, Aug 8, 2004
    #18
  19. magmike

    Toby Inkster Guest

    magmike wrote:

    > I'm not very familiar with PHP - is this a seperate file on the server - or
    > is it included in the code of the actuall page returning the database
    > results?


    Can be a seperate file brought in using an include() function or can be
    copy and pasted in directly.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
    Now Playing ~ ./billy_joel/new_york_state_of_mind.ogg
    Toby Inkster, Aug 8, 2004
    #19
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. HK
    Replies:
    0
    Views:
    267
  2. Sharp Tool

    Riddle me this

    Sharp Tool, Nov 6, 2005, in forum: Java
    Replies:
    29
    Views:
    1,164
    John C. Bollinger
    Nov 10, 2005
  3. Big Bill
    Replies:
    33
    Views:
    2,573
    Big Bill
    Oct 8, 2004
  4. CBFalconer

    Re: Riddle

    CBFalconer, Jan 20, 2005, in forum: C++
    Replies:
    0
    Views:
    401
    CBFalconer
    Jan 20, 2005
  5. Juha Haataja

    Solving the Einstein's Riddle in Python

    Juha Haataja, May 24, 2004, in forum: Python
    Replies:
    10
    Views:
    869
    Christos TZOTZIOY Georgiou
    May 25, 2004
Loading...

Share This Page