Eigen panel toevoegen phpBB3


Een tijdje geleden vroeg iemand op het phpBB.com forum of het mogelijk is om bij het plaatsen van een reactie een tabje toe te voegen. De oplossing heb ik op het forum daar geplaatst, maar voor mezelf wou ik het toch ook nog even vastleggen.

Benodigde wijzigingen

First add an li in the tabs id, example line:

<li><a href="#tabs" onclick="subPanels('options-test'); return false;"><span>Test</span></a></li>

The name options-test is important, we’ll have to use that later to define the content.

Find the line that says

<!-- IF not S_SHOW_DRAFTS and not $SIG_EDIT eq 1 -->

Beneath this line you’ll see a line that says:

<div class="panel bg3" id="options-panel">

So, beneath the above mentioned line you’ll find a div for the options-panel. For the attachment-panel and the poll-panel there are two seperate files with the contents (posting_attach_body.html and posting_poll_body.html).

So we have to add our own div with our content. You can add this immediately beneath the first line mentioned in step 2:

<div class="panel bg3" id="options-test">
        <div class="inner"><span class="corners-top"><span></span></span>
       <p>Bla bla bla</p>
        <span class="corners-bottom"><span></span></span></div>
</div>

In the file posting_buttons.html find the line:

var panels = new Array('options-panel', 'attach-panel', 'poll-panel');

And add your own panel-name in the array. This last step is important. If you skip this your own panel will always be visible, even when it’s not active.


Leave a Reply

Your email address will not be published. Required fields are marked *