Loading...
 
Features / Usability

Features / Usability


[solved] How to display the text "{{bbox}}" in a tiki-wiki 21LTS?

posts: 55

The text "" is not shown (just displays nothing instead) in my tiki 21LTS in the wiki n matter what I do, I tried:

  • {CODE(mediawiki="0")}{CODE}
  • ~np ~~ /np~ (without spaces)

just to name a few... nothing shows - in fact I am surprised that it works here in the forums... is there an option affecting this? Or is it my version of tiki?

posts: 55

Wow, Bernard Sfez / Tiki Specialist, that actually works!

Next problem: I want to use it inside {CODE(mediawiki="0")}{CODE}. Unfortunately, if I use ~ np ~ inside it, everything inside ~ np ~ is transormed into a hash or something... so the first bracket { is displayed as a hash. If I use {CODE(mediawiki="1")}{CODE}, the ~ np ~ works as expected, but all my line breaks get messed up... :-(

I just want to put some code, preferredly without ANY changes to show up exactly as is in the source. I also want it to stand out a bit compared to normal text. Maybe there is a different/better tag to put my code into?

posts: 8516 Israel

I don't know how to do this... 😎
I tried different way and only by creating a screenshot I was able to display it.

posts: 126825 United Kingdom
FootlooseTraveller wrote:
...I want to use it inside {CODE(mediawiki="0")}{CODE}. Unfortunately, if I use ~ np ~ inside it, everything inside ~ np ~ is transormed into a hash or something...


That's an old bug, i'm sure there's a ticket/wish for it somewhere. I tried a few times to fix it but failed - if you can find the bug do update it with current version numbers and it might get some attention (one day)

posts: 2428 Czech Republic

Try this:

{MARKDOWN()}`~np~{~/np~{bbox}}`{MARKDOWN}

Result:

{{bbox}}


Or this:

{CODE(mediawiki="0")}~np~{~/np~{bbox}}{CODE}

Result:
{{bbox}}

FootlooseTraveller wrote:

Wow, Bernard Sfez / Tiki Specialist, that actually works!

Next problem: I want to use it inside {CODE(mediawiki="0")}{CODE}. Unfortunately, if I use ~ np ~ inside it, everything inside ~ np ~ is transormed into a hash or something... so the first bracket { is displayed as a hash. If I use {CODE(mediawiki="1")}{CODE}, the ~ np ~ works as expected, but all my line breaks get messed up... :-(

I just want to put some code, preferredly without ANY changes to show up exactly as is in the source. I also want it to stand out a bit compared to normal text. Maybe there is a different/better tag to put my code into?

posts: 55
luciash d' being 🧙 wrote:

Try this:

{MARKDOWN()}`~np~{~/np~{bbox}}`{MARKDOWN}

Result:

{{bbox}}


I played around with this a bit. It works for a one-liner. If I break the line it is still a one-liner. If I break the line twice (double-line-break), it does not work anymore. I need something where I can just put my code and have line breaks and indents with spaces preserved and not interpreted anything.

luciash d' being 🧙 wrote:

Or this:

{CODE(mediawiki="0")}~np~{~/np~{bbox}}{CODE}

Result:
{{bbox}}


Seems like this got fixed. My result in tiki 21 LTS:

§aeb5a97041fb1f1066934b573e35aec4§{bbox}}


So this would be my best solution by now. I would have to do a minor change to my code (not many double curly brackets there) and wait for tiki 24 LTS. That is OK for me as this code thingy is on a private part of my wiki. It is only for myself, nobody else sees it. Thanks.

posts: 2428 Czech Republic

In Markdown syntax to put multi-line code you need to use three backticks around: ```

luci

FootlooseTraveller wrote:
I played around with this a bit. It works for a one-liner. If I break the line it is still a one-liner. If I break the line twice (double-line-break), it does not work anymore. I need something where I can just put my code and have line breaks and indents with spaces preserved and not interpreted anything.
posts: 55
luciash d' being 🧙 wrote:

In Markdown syntax to put multi-line code you need to use three backticks around: ```
luci


WOW! THIS IS IT! THIS IS THE ANSWER! Thank you so much!

posts: 2428 Czech Republic

You can also disable the preference "Wiki argument variables" if you do not need it for anything else (Preference name: feature_wiki_argvariable) to avoid parsing the double curly brackets.

FootlooseTraveller wrote:

Wow, Bernard Sfez / Tiki Specialist, that actually works!

Next problem: I want to use it inside {CODE(mediawiki="0")}{CODE}. Unfortunately, if I use ~ np ~ inside it, everything inside ~ np ~ is transormed into a hash or something... so the first bracket { is displayed as a hash. If I use {CODE(mediawiki="1")}{CODE}, the ~ np ~ works as expected, but all my line breaks get messed up... :-(

I just want to put some code, preferredly without ANY changes to show up exactly as is in the source. I also want it to stand out a bit compared to normal text. Maybe there is a different/better tag to put my code into?

posts: 55
luciash d' being 🧙 wrote:
You can also disable the preference "Wiki argument variables" if you do not need it for anything else (Preference name: feature_wiki_argvariable) to avoid parsing the double curly brackets.


I actually use them in the public part of my wiki, so this has precedence over this code thingy, which is in the private part of my wiki, only I can see it.