Skip to main content

View Diary: Daily Kos Gulf Watchers ROV #166 - BP's Gulf Catastrophe (285 comments)

Comment Preferences

  •  Maybe with a table of contents in the ROV that (10+ / 0-)

    link to specific subsections of the mothership, so that people know both how much and what kinds of things to find there.

    •  Those sections will be in the digest. (7+ / 0-)

      I need to ensure our rearranging team knows how to use markers.

      Whitis, WHITIS, Beuler!

      •  using anchors, scoop quirks (4+ / 0-)
        Recommended by:
        Wee Mama, peraspera, Tomtech, Yasuragi

        I don't think we have tested markers in the diary itself yet but tests did work with an anchor in the comments and thus is likely to work unless dailykos filters tags differenntly in comments vs diaries.   The actual action based on the tags is done by the web browser so there is no need for dailykos/scoop to explicitly support linking from comments to diary text.

        Using the anchors is pretty easy, though you need to decide when it is appropriate to use a relative vs an absolute link.  However, I have documented a number of quirks related to dailykos's sloppy way of doing things and that gets a bit technical.

        To place an anchor around "My Text", write:

          <a name="myanchorname">My Text</a>

        It only needs to be a small portion of the text, like a section heading.

        Linking to the anchor is a little more complicated.    A simple relative link is easy:

          <a href="#myanchorname">My link text</a>

        Notice the "#" before the anchor name listed.
        Pros:

        • Will work regardless of whether someone came to the page via the short or long format urls.

        Cons:

        • Links inside comments viewed divorced from the diary (i.e. from search results) will not work, since a relative link links to someplace inside the same web page as seen by the browser.

        An absolute link:

        <a href="http://www.example.com/foo/bar.html#myanchorname">
        My link text</a>

        Notice that this is the url of the page being linked to, followed by a "#", followed by the anchor name.   If there is already a "#" followed by anything (and there frequently is for these diaries), you must remove it.
        Pros:

        • Will work inside comments divorced from the main page
        • Will work between pages
        • Always gets you there but may cause an unnecssary page load.

        Cons:

        • For links within the same diary, since there are multiple URLs for the same diary, sometimes this will jump within the copy of the page you are viewing and sometimes it will load a new copy of the page.  Either way, you do get there.

        Catch is with the mix of short and long form links to diaries, your web browser doesn't know that these two urls
        http://www.dailykos.com/...
        http://www.dailykos.com/...
        Actually point to the same content.   Well, actually, it sort of does.   Which ever URL you use to get to the diary, the header contains this:

        <link rel="canonical" href="http://www.dailykos.com/storyonly/2010/7/2/880996/-Daily-Kos-Gulf-Watchers-ROV-#166BPs-Gulf-Ca tastrophe" />

        which does tell the browser the pages are the same; but the browser doesn't have that information before it loads the page header and may not use it.   It may also be confused by the "#" in the url (see below).  Further, it is a bit of a lie as both the "/story/" and "/storyonly/" versions of the page claim to have the same cannonical url and if the browser ever did try to be smart, you might be unable to load the comments as the "View Comments" link points a page that claims it is equivalent but isn't.  In practice, this is used by seach engines like google to link to the "best" version of a page.   It is also something we could use when extracting lists of links from the liveblogs to eliminate duplicates (though it is slow).

        Now, there is another weirdness created by the use of the character "#" in diary titles.
        The long form link used by dialykos:
        http://www.dailykos.com/...
        Is really a link to the anchor 166BPs-Gulf-Catastrophe inside the page:
        http://www.dailykos.com/...
        Dailykos servers doen't care because it uses the number to find the diary although it does check that whatever diary title text there matches an initial substring of one of the versions of the diary title.    I.e. shortening the title part to "-Daily-" will work but changing to "foo" will not.
        But it fails to filter the "#" character from the url it generates.   I.E. the server code has a kludge to work around the problem rather than avoiding fixing the problem.
        The browser, not finding the "166BPs-Gulf-Catastophe" anchor, just skips jumping to the anchor and starts at the top of the page (unless of course, you have created an anchor that happens to have a name matching the part of the diary title after the "#").

Subscribe or Donate to support Daily Kos.

Click here for the mobile view of the site