Template talk:FileBox
Before creating a discussion or leaving a comment, please read about using talk pages. To create a new discussion, click here. Comments on an existing discussion should be signed using
~~~~
:
A comment [[User:Larry|Larry]] 13:52, 13 May 2024 (UTC) : A reply [[User:Sally|Sally]] 10:53, 5 November 2024 (UTC) :: Your reply ~~~~
Indentation of first line of content
This template doesn't appear to preserve indentation (spaces) for the first line of content. For example, the contents of the FileBox templates at MediaTomb#MySQL are all indented. The indent is only preserved for second and subsequent lines of content. I can preserve the indents if I wrap the content with <nowiki></nowiki>, but I then loose syntax highlighting. Is this expected behavior or am I missing something? --BT (talk) 15:48, 1 January 2015 (UTC)
- Try just setting
<nowiki />
, like so:
<host>localhost</host>
<port>2812</port>
--SwifT (talk) 15:53, 1 January 2015 (UTC)
Issue with syntax highlighing?
Hi, has something changed recently with this syntax handling in this template?
If I try the given example text:
{{FileBox|title=FileBox example 1|filename=/tmp/file1|lang=bash|1= #!/bin/bash echo "Hello, world!" }}
it works OK:
#!/bin/bash
echo "Hello, world!"
But, if I add another line to the file, so:
{{FileBox|title=FileBox example 2|filename=/tmp/file2|lang=bash|1= #!/bin/bash echo "Hello, world!" echo "Goodbye, world!" }}
the highlighting goes away, and the page gets added to the "Pages with syntax highlighting errors" category:
#!/bin/bash
echo "Hello, world!"
echo "Goodbye, world!"
I have found also that existing complex FileBox bash examples in my EFI guide (e.g. ebuilds) display OK, but if I edit them (even to add comment lines), the syntax highlighting drops out.
I'm sure I'm doing something dumb here, please help! --Sakaki (talk) 17:25, 19 August 2017 (UTC)
Another failing test (for bug report):
{{FileBox|title=FileBox example 2|filename=/tmp/file2|lang=bash|1= #!/bin/bash echo "Hello, world!" echo "Farewell, world!" }}
gives:
#!/bin/bash
echo "Hello, world!"
echo "Farewell, world!"
--Sakaki (talk) 11:57, 21 August 2017 (UTC)
Hi Sakaki , Cronolio , and everyone. At first glance seems to be something happening on the wiki's backend, but I haven't looked too closely yet. I've been needing to do updates to wiki extensions for a while now which I will try hard to get some performed this weekend (Friday/Saturday). Please use proper KernelBox syntax even with the 'Pages with syntax highlighting errors' message displaying. This is proper syntax even if wiki is warning about it. I'll add a message to the front page of the wiki once I get things updated. Kind regards, --Maffblaster (talk) 17:10, 21 September 2017 (UTC)
- Hi Matthew Marchese (Maffblaster) , I was just wondering if there was any progress on this, or some workaround that can be adopted? The list of pages with syntax highlighting errors seems to have grown quite large now ^-^ Kind regards, --Sakaki (talk) 14:21, 16 November 2017 (UTC)
The remaining pages with syntax highlighting errors are because of missing xorg.conf lexer support. However it was added to dev-python/pygments-2.3.1 which has been in the tree for 3 months. Maybe the Wiki backend should update to pygments-2.3.1--BT (talk) 03:04, 23 March 2019 (UTC)
It appears that xorg.conf syntax highlighting is broken again. --BT (talk) 01:55, 2 November 2019 (UTC)
add feature: Render collapse-output
{{FileBox}}
should render (accept) the collapse-output parameter, and seen for example on {{Cmd}}
.
I've checked the sandbox version. It already has some code in it but does not seem to work. Especially on big config file examples, this would be very useful - even necessary.
It would be great if someone with deep knowledge on templates could implement that functionality. Unfortunately, I'm not very skilled on Wiki Templates yet :-(
As an example of a dirty workaround see the "Advanced examples" section of netifrc (look into the code by editing, I've left some <noincluded> comments).
Thank you :-) --Stefan00 (talk) 13:58, 25 October 2019 (UTC)
- I do not understand why I should move the example, can you please explain? Actually, I had to implement it into the netifrc page to keep the page readable. That's why I asked if someone could implement the feature into FileBox itself.
- The alternative without that ugly code modification would be to remove that example from net netifrc page. --Stefan00 (talk) 09:30, 28 October 2019 (UTC)