Difference between revisions of "Template:Toc"

From The Official Visionaire Studio: Adventure Game Engine Wiki
m
m
Line 39: Line 39:
  
 
</script>
 
</script>
<?php
 
 
$filtered_words = array(
 
'http://visionaire-tracker.net/wiki/',
 
'_(日本語)',
 
'_(正體中文)',
 
'_(한국어)',
 
'_(Dansk)',
 
'_(Deutsch)',
 
'_( Español)',
 
'_(Français)',
 
'_(Italiano)',
 
'_(Nederlands)',
 
'_(Polski)',
 
'_(Português)',
 
'_(Svenska)',
 
'_(Русский)';
 
);
 
 
$url="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
 
$filtered_text = str_replace($filtered_words, '', $url);
 
?>
 
 
</html>
 
</html>
{{i18n| <html><?php echo $filtered_text; ?></html> }}
+
{{i18n| <script>
 +
var array = [_(日本語), _(正體中文), _(한국어), _(Dansk), _(Deutsch), _( Español), _(Français), _(Italiano), _(Nederlands), _(Polski), _(Português), _(Svenska), _(Русский)];
 +
string = {{BASEPAGENAME}}
 +
string = string.replace(new RegExp(array.join("|"), "g"), "");
 +
</script> }}
 
<div class="ftoc"><div class="ftoc_content">__TOC__</div></div>
 
<div class="ftoc"><div class="ftoc_content">__TOC__</div></div>
 
</includeonly>
 
</includeonly>

Revision as of 19:41, 30 October 2014

Generates a floating Table of contents menu in a fixed position on the left hand side of the screen.