Shop Learn P1 Docs P2 Docs Events
Chances of old forum links getting repaired? — Parallax Forums

Chances of old forum links getting repaired?

Phil's obituary prompted me to have a look at some of my old bookmarks. First one I looked at was the topic on all the Prop1 used for filtering - https://forums.parallax.com/discussion/118111/digital-filter-potpourri

Most of the links found there are dead, primarily because of the forum software being replaced with something newer over the years. And I know there's other collections just like that one. It would be great to have them fixed up, even if only on a case by case basis.

Comments

  • Wuerfel_21Wuerfel_21 Posts: 3,402
    edited 2023-01-22 14:29

    The http://forums.parallax.com/showthread.php?129701 type links can be easily converted to http://forums.parallax.com/discussion/129701

    I have no idea why that hasn't been done.

    Though there's like 3 other formats, too.

  • Wuerfel_21Wuerfel_21 Posts: 3,402
    edited 2023-01-22 14:46

    In that list post alone, there are 5 link formats. 3 of them map directly to modern thread IDs. The other 2, idk. I tried comment permalinks, but that doesn't work.

    Here's a userscript that auto-fixes the links it can locally (and highlights all the weird ones it can't)

    // ==UserScript==
    // @name         Parallax Link Fixerator
    // @version      0.2
    // @author       Wuerfel_21
    // @match        *://forums.parallax.com/*
    // @run-at document-end
    // ==/UserScript==
    
    (function() {
        'use strict';
    
        const links = document.getElementsByTagName('a');
    
        for (const lnk of links) {
            console.log(`lnk is ${lnk}`);
            var url = lnk.getAttribute("href");
            if (url == null) {
                // dum dum dum dum dum dum dum, du du dum
            } else if (
            url.match(/^https?:\/\/forums\.parallax\.com\/showthread\.php\?(\d+)/) ||
            url.match(/^https?:\/\/forums\.parallax\.com\/showthread\.php\/(\d+)/) ||
            url.match(/^https?:\/\/forums\.parallax\.com\/showthread\.php\?t=(\d+)/) ) {
                console.log("MATCHED THREAD!");
                lnk.setAttribute("href",`https://forums.parallax.com/discussion/${RegExp.$1}/`);
            } else if (
             url.match(/^https?:\/\/forums\.parallax\.com\/showthread\.php\?p=(\d+)/)||
            url.match(/^https?:\/\/forums\.parallax\.com\/forums\/default.aspx\?f=\d+&m=(\d+)/)) {
                console.log("BAD FORMAT!");
                lnk.setAttribute("style","color: red;");
            }
        }
    
    })();
    
  • @VonSzarvas any idea of how to translate the p= kinda URLs?

  • VonSzarvasVonSzarvas Posts: 2,965
    edited 2023-01-25 12:47

    I have a list somewhere that includes every conceivable old url style I could find, plus a bunch of old tags and 'tings. I'll double efforts to hunt it down and share what I have :) Some of the fixes were direct, some involved lookups, so you won't reasonably be able to handle all of them with userscripts unfortunately.

  • evanhevanh Posts: 14,038
    edited 2023-01-25 00:00

    How is a "userscript" used?

  • evanhevanh Posts: 14,038

    oh ...

  • evanhevanh Posts: 14,038
    edited 2023-01-25 10:57

    Ha, most of the links are http://... rather than https://... It wasn't until I replaced Tampermonkey with Greasemonkey whereby it showed case by case errors, so I then understood there was a clear reason for the links still not working for me.

    EDIT: Grr, not the HTTP issue I thought it was. The errors are for the "?p=" types, which you've marked as bad format. :(

  • Does this tool convert the p= links ?

    http://www.phipi.com/forum/convert.html

  • evanhevanh Posts: 14,038

    It doesn't work for anything I tried. Always gives an empty string as solution.

  • @VonSzarvas said:
    Does this tool convert the p= links ?

    http://www.phipi.com/forum/convert.html

    Phil's (R.I.P.) website will inevitably go down sooner or later. Does anyone have any leads as to how we might be able to get the Perl source of this and some of the other useful tools on his site?

Sign In or Register to comment.