2022-11-14 22:43:45 +01:00
<!DOCTYPE html>
< html >
< head >
< meta charset = "utf-8" / >
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" / > < meta name = "generator" content = "Docutils 0.17.1: http://docutils.sourceforge.net/" / >
2023-06-10 07:57:46 +00:00
< title > Clickable links — Evennia 2.x documentation< / title >
2022-11-14 22:43:45 +01:00
< link rel = "stylesheet" href = "../_static/nature.css" type = "text/css" / >
< link rel = "stylesheet" href = "../_static/pygments.css" type = "text/css" / >
< script id = "documentation_options" data-url_root = "../" src = "../_static/documentation_options.js" > < / script >
< script src = "../_static/jquery.js" > < / script >
< script src = "../_static/underscore.js" > < / script >
< script src = "../_static/doctools.js" > < / script >
< script src = "../_static/language_data.js" > < / script >
< link rel = "shortcut icon" href = "../_static/favicon.ico" / >
< link rel = "index" title = "Index" href = "../genindex.html" / >
< link rel = "search" title = "Search" href = "../search.html" / >
2022-11-26 14:42:25 +00:00
< link rel = "next" title = "Inline functions" href = "Inline-Functions.html" / >
< link rel = "prev" title = "Colors" href = "Colors.html" / >
2022-11-14 22:43:45 +01:00
< / head > < body >
2023-06-10 07:57:46 +00:00
2023-06-10 08:53:19 +00:00
2023-06-10 07:57:46 +00:00
2022-11-14 22:43:45 +01:00
< div class = "related" role = "navigation" aria-label = "related navigation" >
< h3 > Navigation< / h3 >
< ul >
< li class = "right" style = "margin-right: 10px" >
< a href = "../genindex.html" title = "General Index"
accesskey="I">index< / a > < / li >
< li class = "right" >
< a href = "../py-modindex.html" title = "Python Module Index"
>modules< / a > |< / li >
< li class = "right" >
2022-11-26 14:42:25 +00:00
< a href = "Inline-Functions.html" title = "Inline functions"
2022-11-14 22:43:45 +01:00
accesskey="N">next< / a > |< / li >
< li class = "right" >
2022-11-26 14:42:25 +00:00
< a href = "Colors.html" title = "Colors"
2022-11-14 22:43:45 +01:00
accesskey="P">previous< / a > |< / li >
2023-06-10 07:57:46 +00:00
< li class = "nav-item nav-item-0" > < a href = "../index.html" > Evennia 2.x< / a > » < / li >
2022-11-26 14:42:25 +00:00
< li class = "nav-item nav-item-1" > < a href = "Concepts-Overview.html" > Core Concepts< / a > » < / li >
< li class = "nav-item nav-item-2" > < a href = "Tags-Parsed-By-Evennia.html" accesskey = "U" > In-text tags parsed by Evennia< / a > » < / li >
2022-11-14 22:43:45 +01:00
< li class = "nav-item nav-item-this" > < a href = "" > Clickable links< / a > < / li >
< / ul >
2023-06-10 08:53:19 +00:00
< / div >
2022-11-14 22:43:45 +01:00
< div class = "document" >
< div class = "documentwrapper" >
< div class = "sphinxsidebar" role = "navigation" aria-label = "main navigation" >
< div class = "sphinxsidebarwrapper" >
< p class = "logo" > < a href = "../index.html" >
< img class = "logo" src = "../_static/evennia_logo.png" alt = "Logo" / >
< / a > < / p >
< div id = "searchbox" style = "display: none" role = "search" >
< h3 id = "searchlabel" > Quick search< / h3 >
< div class = "searchformwrapper" >
< form class = "search" action = "../search.html" method = "get" >
< input type = "text" name = "q" aria-labelledby = "searchlabel" / >
< input type = "submit" value = "Go" / >
< / form >
< / div >
< / div >
< script > $ ( '#searchbox' ) . show ( 0 ) ; < / script >
2023-03-24 22:21:20 +00:00
< h3 > < a href = "../index.html" > Table of Contents< / a > < / h3 >
< ul >
< li > < a class = "reference internal" href = "#" > Clickable links< / a > < ul >
2023-03-24 22:53:07 +00:00
< li > < a class = "reference internal" href = "#click-to-run-a-command" > Click to run a command< / a > < / li >
< li > < a class = "reference internal" href = "#click-to-open-an-url-in-a-web-browser" > Click to open an url in a web browser< / a > < / li >
< li > < a class = "reference internal" href = "#settings" > Settings< / a > < / li >
2023-03-24 22:21:20 +00:00
< / ul >
< / li >
< / ul >
2022-11-14 22:43:45 +01:00
< h4 > Previous topic< / h4 >
< p class = "topless" > < a href = "Colors.html"
2022-11-26 14:42:25 +00:00
title="previous chapter">Colors< / a > < / p >
< h4 > Next topic< / h4 >
< p class = "topless" > < a href = "Inline-Functions.html"
title="next chapter">Inline functions< / a > < / p >
2022-11-14 22:43:45 +01:00
< div role = "note" aria-label = "source link" >
<!-- h3>This Page</h3 -->
< ul class = "this-page-menu" >
< li > < a href = "../_sources/Concepts/Clickable-Links.md.txt"
rel="nofollow">Show Page Source< / a > < / li >
< / ul >
< / div > < h3 > Links< / h3 >
< ul >
2023-02-25 16:50:58 +00:00
< li > < a href = "https://www.evennia.com/docs/latest/index.html" > Documentation Top< / a > < / li >
< li > < a href = "https://www.evennia.com" > Evennia Home< / a > < / li >
< li > < a href = "https://github.com/evennia/evennia" > Github< / a > < / li >
2022-11-14 22:43:45 +01:00
< li > < a href = "http://games.evennia.com" > Game Index< / a > < / li >
< li >
< a href = "https://discord.gg/AJJpcRUhtF" > Discord< / a > -
< a href = "https://github.com/evennia/evennia/discussions" > Discussions< / a > -
< a href = "https://evennia.blogspot.com/" > Blog< / a >
< / li >
< / ul >
2023-06-10 07:57:46 +00:00
< h3 > Doc Versions< / h3 >
2022-11-14 22:43:45 +01:00
< ul >
2023-06-10 07:57:46 +00:00
< li > < a href = "Clickable-Links.html" > 2.x (main branch)< / a > < / li >
2022-11-15 20:29:38 +00:00
< ul >
2023-06-10 08:12:58 +00:00
< li > < a href = "../1.3.0/index.html" > 1.3.0 (v1.3.0 branch)< / a > < / li >
2023-06-10 07:57:46 +00:00
2023-06-10 08:12:58 +00:00
< li > < a href = "../0.9.5/index.html" > 0.9.5 (v0.9.5 branch)< / a > < / li >
2023-06-10 07:57:46 +00:00
2022-11-15 20:29:38 +00:00
2022-11-14 22:43:45 +01:00
< / ul >
< / div >
< / div >
< div class = "bodywrapper" >
< div class = "body" role = "main" >
< section class = "tex2jax_ignore mathjax_ignore" id = "clickable-links" >
< h1 > Clickable links< a class = "headerlink" href = "#clickable-links" title = "Permalink to this headline" > ¶< / a > < / h1 >
2023-03-24 22:53:07 +00:00
< p > Evennia allows for clickable links in text for clients that supports it. This marks certain text so it can be clicked by a mouse and either trigger a given Evennia command, or open a URL in an external web browser. To see clickable links, the player must use the Evennia webclient or a third-party telnet client with < a class = "reference external" href = "http://www.zuggsoft.com/zmud/mxp.htm" > MXP< / a > support (< em > Note: Evennia only supports clickable links, no other MXP features< / em > ).< / p >
< p > Users with clients lacking MXP support will only see the link as normal text.< / p >
< div class = "admonition important" >
< p class = "admonition-title" > Important< / p >
< p > By default, clickable links can < em > not< / em > be added from in-game. Trying to do so will have the link come back as normal text. This is a security measure. See < a class = "reference internal" href = "#settings" > < span class = "std std-doc" > Settings< / span > < / a > for more information.< / p >
< / div >
< section id = "click-to-run-a-command" >
< h2 > Click to run a command< a class = "headerlink" href = "#click-to-run-a-command" title = "Permalink to this headline" > ¶< / a > < / h2 >
< div class = "highlight-default notranslate" > < div class = "highlight" > < pre > < span > < / span > < span class = "o" > |< / span > < span class = "n" > lc< / span > < span class = "n" > command< / span > < span class = "o" > |< / span > < span class = "n" > lt< / span > < span class = "n" > text< / span > < span class = "o" > |< / span > < span class = "n" > le< / span >
< / pre > < / div >
< / div >
< p > Example:< / p >
2022-11-14 22:43:45 +01:00
< div class = "highlight-default notranslate" > < div class = "highlight" > < pre > < span > < / span > < span class = "s2" > " If you go |lcnorth|ltto the north|le you will find a cottage." < / span >
< / pre > < / div >
< / div >
2023-03-24 22:53:07 +00:00
< p > This will display as “If you go < strong > to the north< / strong > you will find a cottage.” where clicking the link will execute the command < code class = "docutils literal notranslate" > < span class = "pre" > north< / span > < / code > .< / p >
< / section >
< section id = "click-to-open-an-url-in-a-web-browser" >
< h2 > Click to open an url in a web browser< a class = "headerlink" href = "#click-to-open-an-url-in-a-web-browser" title = "Permalink to this headline" > ¶< / a > < / h2 >
< div class = "highlight-default notranslate" > < div class = "highlight" > < pre > < span > < / span > < span class = "o" > |< / span > < span class = "n" > lu< / span > < span class = "n" > url< / span > < span class = "o" > |< / span > < span class = "n" > lt< / span > < span class = "n" > text< / span > < span class = "o" > |< / span > < span class = "n" > le< / span >
2023-03-24 22:21:20 +00:00
< / pre > < / div >
< / div >
2023-03-24 22:53:07 +00:00
< p > Example:< / p >
2023-03-24 23:28:21 +00:00
< div class = "highlight-default notranslate" > < div class = "highlight" > < pre > < span > < / span > < span class = "s2" > " Omnious |luhttps://mycoolsounds.com/chanting|ltchanting sounds|le are coming from beyond the door." < / span >
2023-03-24 22:21:20 +00:00
< / pre > < / div >
< / div >
2023-03-24 22:53:07 +00:00
< p > This will show as “Omnious < strong > chanting sounds< / strong > are coming from beyond the door”, where clicking the link will open the url in a browser if the client supports doing so.< / p >
2023-03-24 22:21:20 +00:00
< / section >
2023-03-24 22:53:07 +00:00
< section id = "settings" >
< h2 > Settings< a class = "headerlink" href = "#settings" title = "Permalink to this headline" > ¶< / a > < / h2 >
< p > Enable / disable MXP overall (enabled by default).< / p >
2023-03-24 22:21:20 +00:00
< div class = "highlight-default notranslate" > < div class = "highlight" > < pre > < span > < / span > < span class = "n" > MXP_ENABLED< / span > < span class = "o" > =< / span > < span class = "kc" > True< / span >
< / pre > < / div >
< / div >
2023-03-24 22:53:07 +00:00
< p > By default help entries have clickable topics.< / p >
2023-03-24 22:21:20 +00:00
< div class = "highlight-default notranslate" > < div class = "highlight" > < pre > < span > < / span > < span class = "n" > HELP_CLICKABLE_TOPICS< / span > < span class = "o" > =< / span > < span class = "kc" > True< / span >
< / pre > < / div >
< / div >
2023-03-24 22:53:07 +00:00
< p > By default clickable links are only available < em > from strings provided in code< / em > (or via a < a class = "reference internal" href = "../Components/Batch-Processors.html" > < span class = "doc std std-doc" > batch script< / span > < / a > ). You < em > cannot< / em > create clickable links from inside the game - the result will not come out as clickable.< / p >
< p > This is a security measure. Consider if a user were able to enter clickable links in their description, like this:< / p >
< div class = "highlight-default notranslate" > < div class = "highlight" > < pre > < span > < / span > |lc give 1000 gold to Bandit |ltClick here to read my backstory!|le
< / pre > < / div >
< / div >
< p > This would be executed by the poor player clicking the link, resulting in them paying 1000 gold to the bandit.< / p >
< p > This is controlled by the following default setting:< / p >
< div class = "highlight-default notranslate" > < div class = "highlight" > < pre > < span > < / span > < span class = "n" > MXP_OUTGOING_ONLY< / span > < span class = "o" > =< / span > < span class = "kc" > True< / span >
< / pre > < / div >
< / div >
< p > Only disable this protection if you know your game cannot be exploited in this way.< / p >
2023-03-24 22:21:20 +00:00
< / section >
2022-11-14 22:43:45 +01:00
< / section >
< / div >
< / div >
< / div >
< / div >
< div class = "related" role = "navigation" aria-label = "related navigation" >
< h3 > Navigation< / h3 >
< ul >
< li class = "right" style = "margin-right: 10px" >
< a href = "../genindex.html" title = "General Index"
>index< / a > < / li >
< li class = "right" >
< a href = "../py-modindex.html" title = "Python Module Index"
>modules< / a > |< / li >
< li class = "right" >
2022-11-26 14:42:25 +00:00
< a href = "Inline-Functions.html" title = "Inline functions"
2022-11-14 22:43:45 +01:00
>next< / a > |< / li >
< li class = "right" >
2022-11-26 14:42:25 +00:00
< a href = "Colors.html" title = "Colors"
2022-11-14 22:43:45 +01:00
>previous< / a > |< / li >
2023-06-10 07:57:46 +00:00
< li class = "nav-item nav-item-0" > < a href = "../index.html" > Evennia 2.x< / a > » < / li >
2022-11-14 22:43:45 +01:00
< li class = "nav-item nav-item-1" > < a href = "Concepts-Overview.html" > Core Concepts< / a > » < / li >
2022-11-26 14:42:25 +00:00
< li class = "nav-item nav-item-2" > < a href = "Tags-Parsed-By-Evennia.html" > In-text tags parsed by Evennia< / a > » < / li >
2022-11-14 22:43:45 +01:00
< li class = "nav-item nav-item-this" > < a href = "" > Clickable links< / a > < / li >
< / ul >
< / div >
2023-06-10 08:53:19 +00:00
2022-11-14 22:43:45 +01:00
< div class = "footer" role = "contentinfo" >
2023-02-26 22:34:19 +00:00
© Copyright 2023, The Evennia developer community.
2022-11-14 22:43:45 +01:00
Created using < a href = "https://www.sphinx-doc.org/" > Sphinx< / a > 3.2.1.
< / div >
< / body >
< / html >