Polifonic Documentation
  • Sign in
  • Sign up
  • Contents
    • Syntax
  • en
    • en - English

Syntax

Syntax

  • Typography
  • Links
  • Lists
  • Files (media)
  • No formatting
  • Alerts
  • Boxes (Panels)
  • Special characters
  • Emojis
  • Labels
  • FontAwesome icons
  • Acronyms
  • Code
  • Console output
  • Graphs
  • Math formulas
  • Page index
  • Collapsible elements
  • Footnotes
  • Common attributes

Contents

Contents

  • Home page
  • Wiki 101
  • Creating content
  • Syntax reference
  • Managing your wiki

Code

To display formatted code, use the %%<code>%% tag.

Syntax

%%<code>%%source code%%</code>%%

Syntax highlighting

Syntax highlighting will be applied automatically if you supply a language attribute.

%%<code%% php>...%%</code>%%

<?php
echo $_SERVER['HTTP_USER_AGENT'];
?>

Internally, Polifonic uses the GeSHi generic syntax highlighter. All languages supported by GeSHi are therefore supported by Polifonic.

Line numbers

To display line numbers, add the lines:true attribute.

%%<code%% php lines:true>...%%</code>%%

  1. <?php
  2. echo $_SERVER['HTTP_USER_AGENT'];
  3. ?>

To start line numbering at a specific number, set that number as the value of the lines attribute.

%%<code%% php lines:10>...%%</code>%%

  1. <?php
  2. echo $_SERVER['HTTP_USER_AGENT'];
  3. ?>

Title

You can also display a title via the title attribute.

%%<code%% php | Example PHP code>...%%</code>%%

Example PHP Code

<?php
echo $_SERVER['HTTP_USER_AGENT'];
?>
This page was modified on 4 Nov 2015 at 2:06 PM.

Source

====== Code ====== To display formatted code, use the ''%%<code>%%'' tag. ===== Syntax ===== ''%%<code>%%//source code//%%</code>%%'' ==== Syntax highlighting ==== Syntax highlighting will be applied automatically if you supply a ''language'' attribute. ''%%<code%% **php**>...%%</code>%%'' <code php> <?php echo $_SERVER['HTTP_USER_AGENT']; ?> </code> Internally, Polifonic uses the [[http://qbnz.com/highlighter/|GeSHi]] generic syntax highlighter. All languages supported by GeSHi are therefore supported by Polifonic. ==== Line numbers ==== To display line numbers, add the ''lines:true'' attribute. ''%%<code%% php **lines:true**>...%%</code>%%'' <code php lines:true> <?php echo $_SERVER['HTTP_USER_AGENT']; ?> </code> To start line numbering at a specific number, set that number as the value of the ''lines'' attribute. ''%%<code%% php **lines:10**>...%%</code>%%'' <code php lines:10> <?php echo $_SERVER['HTTP_USER_AGENT']; ?> </code> ==== Title ==== You can also display a title via the ''title'' attribute. ''%%<code%% php | **Example PHP code**>...%%</code>%%'' <code php | Example PHP Code> <?php echo $_SERVER['HTTP_USER_AGENT']; ?> </code>
This website uses cookies to ensure you get the best browsing experience.