Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

PerlMonks Shortcuts in Other ChatterBox Clients

by choroba (Cardinal)
on Sep 03, 2021 at 16:46 UTC ( [id://11136421]=monkdiscuss: print w/replies, xml ) Need Help??

I didn't want to implement all the shortcuts PerlMonks provides in What shortcuts can I use for linking to other information? in my ChatterBox client, so I just redirected the links to /?node=.... When you clicked on [imdb://Office Space] in pm-cb-g, it opened https://www.perlmonks.org/?node=imdb://Office+Space—but after the change from April 16 ("Open redirects are disabled"), this stopped working!

Is there a way how to get the target link from a shortcut? I.e. I don't want to redirect to it, I just want to get the link back so I can open it myself.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re: PerlMonks Shortcuts in Other ChatterBox Clients
by Corion (Patriarch) on Sep 03, 2021 at 16:51 UTC

    Not yet, but it makes sense to have the functionality for expanding shortcuts available through an API. The change in April was so that the website cannot be used to obfuscate URLs for normal web browsers.

    I think basically the API would still be to make a GET (or POST) request and get back the resolved URL. The main change would be that it's not a HTTP redirect anymore but in the body.

    If you have a better idea for the API, I'm interested in hearing it :)

      That's exactly what I would need! Being a pmdev member, I should even be able to provide it to myself... if I can get some pointers on where to start :-)

      map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
        I would look for the code of the various XML tickers - you are already using one - trying to adapt it to your needs.

        IIRC are the link-types defined in a table like structure. The same structure is used to display the help page , so finding the help page and activating code view from the dev nodelet should do.°

        No idea how to create a new ticker, the gods should know.

        HTH :)

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery

        update

        °) here you go handlelinks settings .

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: PerlMonks Shortcuts in Other ChatterBox Clients
by choroba (Cardinal) on Sep 07, 2021 at 21:32 UTC
    Thanks to Corion who provided the XML ticker resolving the shortcuts. pm-cb-g now supports shortcuts again!
    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: monkdiscuss [id://11136421]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-19 04:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found