Initial system

This manual is built up for phpBB-3. You can download the current version (on 05.11.2016 it was phpBB-3.1.10) and install it on your local system. We used a XAMPP installation with Apache Server and MySQL Enviroment. You can use the LaTeX4technics editor in combination with MathJax and also with native LaTeX enviroments. If you want to know how to integrate MathJax into your phpBB-Forum read another article.

Integrate LaTeX4technics in phpBB3

  • 1

    Generate buttons

    You need to assign specific classes to buttons in order to connect these buttons with the LaTeX4technics library
    copy
    
    <!-- LaTeX4technics Button for inline equation -->
    <input type="button" class="button2 L4tinlinebtn" value="Insert inline equation"/>
    <!-- LaTeX4technics Button for display equation -->
    <input type="button" class="button2 L4tdisplaybtn" value="Insert display equation"/>
    
    We inserted this code at the end of the styles/prosilver/template/posting_buttons.html. If you open a new topic or reply to an existing topic you will see two additional buttons. You can change the text of the buttons and style with additional classes (like button2 does), but the LaTeX4technics default-classnames need to be included!
    phpBB texteditor

    Hint

    Please be aware that you need to activate the changes of your style template. Therefore you go to the Admin Control Panel and change the 'Recompile stale style components' from No to Yes.

  • 2

    Connect LaTeX4technics to buttons

    Right now the buttons are created but there is no action linked to them. Therefore you go to styles/prosilver/template/overall_footer.html and add this code right before the body tag ends. Be aware of changing the application_id. If you don't have a app-id you can use the connection between LaTeX4technics and your site with all features available. If you want a customized version of the equation editor you have to go to your LaTeX4technics dashboard and create an customized application.
    copy
    <!-- LaTeX4technics configuration and library -->
    <script type="text/javascript" >
    var L4tconfig ={
    application_id : "your_app_id",
    receiver_field_id : "message",
    displayMath_delimiter_start : "$$",
    displayMath_delimiter_end : "$$",
    inlineMath_delimiter_start : "$",
    inlineMath_delimiter_end : "$",
    x_ratio : "0.6",
    y_ratio : "0.8"
    }
    </script>
    <script type="text/javascript"  src="https://www.latex4technics.com/js/textarea_l4t_integration.js"></script>
    
    Now you can use all the power of LaTeX4technics in your forum. Both buttons are connected to an customized LaTeX4technics instance, which is able to write equations directly to the textarea.