Template:Boxcodelite: Difference between revisions

From PS3 Developer wiki
Jump to navigation Jump to search
m (Sandungas moved page Template:Gameconfig to Template:Boxcodelite without leaving a redirect: Better name)
mNo edit summary
Line 2: Line 2:
  <div style="margin-bottom:-5px; text-align:center; font-weight:bold;">{{{title|Code Sample}}}</div>
  <div style="margin-bottom:-5px; text-align:center; font-weight:bold;">{{{title|Code Sample}}}</div>
  <div style="margin:5px; border:1px dashed #bb8866;">
  <div style="margin:5px; border:1px dashed #bb8866;">
   <div style="margin-top:-12px; margin-bottom:-12px;">{{{content|content}}}</div>
   <div style="margin-top:-12px; margin-bottom:-12px;">{{{code|code}}}</div>
  </div>
  </div>
</div><noinclude>[[Category:Templates]]<noinclude>
</div><noinclude>[[Category:Templates]]<noinclude>
Line 10: Line 10:
This template is intended to display a floating code box at right of the screen, if used repeatedly the code boxes will be aligned in the same row, are dsiplayed with a vertical displacement to top for an optimal usage of the space available, are supposed to be writen inmediatly after the page section name and any other informative text about what the config does should be written after the code boxes
This template is intended to display a floating code box at right of the screen, if used repeatedly the code boxes will be aligned in the same row, are dsiplayed with a vertical displacement to top for an optimal usage of the space available, are supposed to be writen inmediatly after the page section name and any other informative text about what the config does should be written after the code boxes


*'''<nowiki>{{gameconfig|title=Title|content=Config}}</nowiki>'''
*'''<nowiki>{{gameconfig|title=Title|code=Config}}</nowiki>'''
**This way allows to display some plain text inside the box, consider it a "hack" that eventually could come in handy incase there are problems with the other modes, but better avoid it
**This way allows to display some plain text inside the box, consider it a "hack" that eventually could come in handy incase there are problems with the other modes, but better avoid it
*'''<nowiki>{{gameconfig|title=Title|float=left|content=Config}}</nowiki>'''
*'''<nowiki>{{gameconfig|title=Title|float=left|code=Config}}</nowiki>'''
**By default it floats to right, but can be configured to float left
**By default it floats to right, but can be configured to float left
*'''<nowiki>{{gameconfig|title=Title|content=<pre>Config</pre>}}</nowiki>'''
*'''<nowiki>{{gameconfig|title=Title|code=<pre>Config</pre>}}</nowiki>'''
**This displays the texts "preformatted", preserves linespaces, black monospace font on top of white background
**This displays the texts "preformatted", preserves linespaces, black monospace font on top of white background
*'''<nowiki>{{gameconfig|title=Title|content=<syntaxhighlight lang=bash>Config</syntaxhighlight>}}</nowiki>'''
*'''<nowiki>{{gameconfig|title=Title|code=<syntaxhighlight lang=bash>Config</syntaxhighlight>}}</nowiki>'''
**This displays the texts with color highlights for the '''lang=[https://www.mediawiki.org/wiki/Extension:SyntaxHighlight#Supported_languages supported_programming_languages]''', if there is no language that fits use '''lang=[https://en.wikipedia.org/wiki/Bash_%28Unix_shell%29 bash]'''
**This displays the texts with color highlights for the '''lang=[https://www.mediawiki.org/wiki/Extension:SyntaxHighlight#Supported_languages supported_programming_languages]''', if there is no language that fits use '''lang=[https://en.wikipedia.org/wiki/Bash_%28Unix_shell%29 bash]'''


Line 23: Line 23:


== Examples ==
== Examples ==
{{gameconfig|title=BLJM85001|content=<pre>
{{gameconfig|title=BLJM85001|code=<pre>
VERSION = 0xFFFFFFFF
VERSION = 0xFFFFFFFF
S3D.ENABLE = 2
S3D.ENABLE = 2
Line 30: Line 30:
</pre>}}
</pre>}}


{{gameconfig|title=BLJM85001|content=<syntaxhighlight lang=xml>
{{gameconfig|title=BLJM85001|code=<syntaxhighlight lang=xml>
VERSION = 0xFFFFFFFF
VERSION = 0xFFFFFFFF
S3D.ENABLE = 2
S3D.ENABLE = 2

Revision as of 03:50, 30 August 2021

Code Sample
code


Usage

This template is intended to display a floating code box at right of the screen, if used repeatedly the code boxes will be aligned in the same row, are dsiplayed with a vertical displacement to top for an optimal usage of the space available, are supposed to be writen inmediatly after the page section name and any other informative text about what the config does should be written after the code boxes

  • {{gameconfig|title=Title|code=Config}}
    • This way allows to display some plain text inside the box, consider it a "hack" that eventually could come in handy incase there are problems with the other modes, but better avoid it
  • {{gameconfig|title=Title|float=left|code=Config}}
    • By default it floats to right, but can be configured to float left
  • {{gameconfig|title=Title|code=<pre>Config</pre>}}
    • This displays the texts "preformatted", preserves linespaces, black monospace font on top of white background
  • {{gameconfig|title=Title|code=<syntaxhighlight lang=bash>Config</syntaxhighlight>}}


  • When this template was created (august 2021) the <syntaxhighlight> extension is broken in this wiki, so the result of <syntaxhighlight> or <pre> is exactly the same, but better use the display mode with the <syntaxhighlight> as a prevention because eventually the <syntaxhighlight> extension could be fixed

Examples

Template:Gameconfig

Template:Gameconfig