#81 Use <A TITLE...> to fine-tune Related Li

closed-duplicate
Rob Malda
None
5
2002-08-01
2002-04-24
Larry Gilbert
No

Like Slashdot, I like to use a conversational style
when linking to off-site pages. But it really bothered
me that the "Related Links" names couldn't be
customized. In other words, if I had a link named
"click here", it would also show up under Related Links
as "click here". Bleah.

So I made some changes to admin.pl. Now when it slurps
the A links out of a story, it will also look for the
standard TITLE attribute within the A tag. If it finds
one, it will use that. Otherwise, it will just use the
content between the A tags.

Example from real life:

Someone took a <a
href="http://www.ultimatetechnology.com/products/prod_details.php4?pid=1"
title="Ultimate Technology Model 40 POS System"> common
modern-day cash register</a> and <a
href="http://27.org/linuxregister/" title="Linux on a
Cash Register">ported Linux to it</a>.

Before, the Related Links would show up as "common
modern-day cash register" and "ported Linux to it".
With the patch, they show up as "Ultimate Technology
Model 40 POS System" and "Linux on a Cash Register".

(I've entered this description with the assumption that
HTML markup will *not* be rendered as anything except
raw text. Apologies if I have goofed up.)

--Larry (a.k.a. discHead a.k.a. L2G)

Discussion

  • Larry Gilbert
    Larry Gilbert
    2002-04-24

    Change admin.pl to use TITLE attribs. in A links in stories

     
  • Larry Gilbert
    Larry Gilbert
    2002-04-24

    Revised: Change admin.pl to use TITLE attribs. in A links in stories

     
  • Larry Gilbert
    Larry Gilbert
    2002-04-24

    Logged In: YES
    user_id=5040

    I've uploaded a revised patch. The only changes I made were
    to move one operator and to use diff -u to make the patch,
    both in accordance with slashstyle.

     
  • Larry Gilbert
    Larry Gilbert
    2002-04-27

    Logged In: YES
    user_id=5040

    krow asked me to make a version of this patch for the code
    in CVS, so here it is.

     
  • Larry Gilbert
    Larry Gilbert
    2002-05-13

    • assigned_to: nobody --> krow
     
  • Brian Aker
    Brian Aker
    2002-07-31

    • assigned_to: krow --> cmdrtaco
    • status: open --> open-duplicate
     
  • Brian Aker
    Brian Aker
    2002-07-31

    Logged In: YES
    user_id=25967

    Already been applied

     
  • Rob Malda
    Rob Malda
    2002-08-01

    • status: open-duplicate --> closed-duplicate