dlareau / puzzlehunt_server

Server for Puzzle hunts run by Puzzlehunt CMU, but can be repurposed for other hunts.
MIT License
19 stars 16 forks source link

Hyperlinks in custom correct messages #33

Closed TomWildenhain closed 6 years ago

TomWildenhain commented 7 years ago

Please add the ability to put links on custom correct messages. Ideally, both the display text and link would be customizable. Thank you.

dlareau commented 7 years ago

What do you imagine using this for? I want an idea of how the user interface should look/feel.

TomWildenhain commented 7 years ago

We may want to link to content like other web pages pages or sound files which might contain stuff for the meta. Or maybe linking to an unlisted YouTube video, etc. An example response might be something like: "Congratulations. Thanks to your efforts we discovered this video." with "this video" having the link.

dlareau commented 7 years ago

That sounds good, I do need an answer to the second part though, how would you expect to interact with this? I think it would just be easiest if there was some way to do it when entering the normal correct answer response, but should there be a hyperlink button? should the response phrase box just support some link syntax (HTML, markdown, custom)? Maybe some other interface I hadn't thought of?

TomWildenhain commented 7 years ago

Markdown syntax should be good for links. No need to implement full markdown support, though, just text and [ (, etc. escape sequences. Also, marking that that particular field has markdown notation for links might be good so we don't forget.

dlareau commented 6 years ago

Responses now support basic markdown format of [ link text ] ( http://www.somelink.com ) Because they are converted to tags, it is important to include the http:// in the link, otherwise it will be relative to the current page and you'll end up with something like https://puzzlehunt.club.cc.cmu.edu/puzzle/401/www.somelink.com