JavaScript failure (General)

by Taurec, Wednesday, July 21, 2021, 13:39 (1033 days ago) @ markp1313


There isn't supposed to be any HTML at the top of the index.php (or any PHP-File). The HTML code of the forum is all laid down in the template files in the themes folder. Defining additional code in the PHPs is not only bad style but will also lead to invalid page source code, because only one pair of HTML tags per page is allowed. By executing the automatic generated HTML code, the browser seems to be correcting the inavild code, adding its own empty head section and starting the body section where your individual content begins, ignoring the original head section. That's why the JavaScript isn't loaded.

Is there a way to put html at the top and still have the forum work right?

Any additional HTML content must be defined in the folder themes/default (if required replacing "default" by the name of your theme). The file main.tpl contains the html structure of the forum. Additional content has to be defined after
<body class="tex2jax_ignore">


Complete thread:

 RSS Feed of thread