in reply to Re^6: Personalizing the linkers (happen)
in thread Personalizing the linkers

The idea behind this was to get pmdev out of the business of providing linker methods, especially the more esoteric ones. Maybe I link a lot to foobar.com in my posts, but no-one else does. Why should the Monastery provide a linker method just for me and my closest friends? But, why should I have to do what a computer can easily do for me? Enter custom linkers.

I'm thinking of a way that I can create a linker that I call foobar:// and it would look like:

foobar: <a href="www.foobar.com?baz=%L">Foobar: %T</a>

Now, you don't have to wade through yet another discussion of how PM does/doesn't provide a linker for foobar.com. I can just go make one. If you like it, add it to the default linkers.


  • In general, if you think something isn't in Perl, try it out, because it usually is. :-)
  • "What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?"

Replies are listed 'Best First'.
Re^8: Personalizing the linkers (happen)
by demerphq (Chancellor) on May 06, 2005 at 17:10 UTC

    Maybe im not understanding things properly, but i dont see how this makes sense. Theres no point in special links that only your userid understands. I can understand the desire to overload the behaviour of the CPAN link and maybe a few more, but I dont really see how customized link types on a per user basis can be made to work, nor why they should be made to work.

    ---
    $world=~s/war/peace/g

      They'd be expanded based on $AUTHOR's settings instead of $USER's settings. Which makes more sense to me on the mode= choice for search.CPAN links. But I could see reasons people would want to customize the links they see, but not in such a restricted way. Now, providing both features would be quite an interesting challenge.

      - tye        

      . . ., but I dont really see how customized link types on a per user basis can be made to work, nor why they should be made to work.

      I make a post that includes a foobar:// link. $reader comes along and wants to read it. The Everything Engine retrieves the text I wrote and post-processes it to generate HTML. It sees [foobar://abcd|ABCD]. The [] brackets say "Go look up a linker method". It does so, checking my personal linkers first. It sees the foobar:// definition and creates a href from it. EE then goes ahead and displays the HTML.

      From $reader's perspective, he has no idea whether or not I did [http://foobar.com?q=abcd|ABCD] or [foobar://abcd|ABCD]. All $reader knows is that s/he can click on the link, be sent to the useful page at foobar.com, and be englightened.

      From my perspective, since I link to foobar.com in over half my posts, my PM experience is improved. And, when I decide to improve how I like to foobar.com, I can change my definition and the EE will go ahead and change the href it generates (if my understand of the EE is correct).

      This makes things like the change from www.perldoc.com to perldoc.perldrunks.org to perldoc.perl.org much easier to manage.


      • In general, if you think something isn't in Perl, try it out, because it usually is. :-)
      • "What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?"

        Ok, I now get what you want, and while hypothetically its doable I have to admit it makes me cringe. What you are saying is that while rendering a page for every node on that page we have to load the authors link options when we render it. For a big thread that could be many authors, even assuming most have no such setting its a lot of work however you look at it.

        I seem to think about this linking mechanism differently to you. To me they are ways to

        • Provide dynamic links for site purposes. This includes things like the pmdev:// and id:// links, which can't really be done any other way.
        • Provide an easy way to do "classed links" for things like searches and lookups, examples being dict:// and jargon:// and cpan:// links.
        for these tasks IMO it makes no sense for you to be able to foist your own interpretation of these links on me. It does however make sense for you to be able to change the way those links look to you. For instance it may be that you have a subscription to some dictionary that is superior to which free one we happen to be linking to at the time, and it seems reasonable that you might want to use the one you have paid for instead. Likewise if you want cpan:// links to point at some alternate resource there is no reason not to.

        But I dont think that you should be able to change the way those links look to me, at least not through this type of mechanism, as its perfectly easy for you to just link directly as appropriate. An example of this is id:// links and named node links. Part of the point of such links is that regardless of which url you are looking at the site and which node is linked you end up in the right place (and thus not logged out) when you follow the links. Forcing your interpretation of such a link on me totally defeats the purpose, you might have well just hardlinked with an A tag. Likewise for the cpan:// tags or similar types, why should you be able to decide what dictionary I visit? Or rather whats the point of doing via a dynamic link? Saving a few chars when typing?

        I can see some benefit in coming up with a template system for what you see, but i dont see the benefit of the other way round, especially given the relative costs of the two.

        ---
        $world=~s/war/peace/g