Jump to content
WebFlake

How to add "Rules" button to shoutbox


TheKonradX

Recommended Posts

Step 1.

Admin CP arrow.png Look & Feel arrow.png Select Template arrow.png skin_shoutbox_hooks arrow.png hookGlobalShoutbox

 

Find:

<input type='button' id='shoutbox-myprefs-button' value='{$this->lang->words['my_prefs']}' class='input_submit alt' />

Add below:

<input type='button' id='shoutbox-rules-button' value='{$this->lang->words['board_rules']}' class='right input_submit alt' />

Step 2.

 

Find:

<script type='text/javascript'>
//<![CDATA[
{$d['js']}
//]]>
</script>

Add below:

<div id='shoutbox-rules' style='display: none; line-height: 1.5;'>
  <h3>{$this->lang->words['board_rules']}</h3>
  <div class='ipsBox'>
    <div class='ipsBox_container ipsPad'>
      <p>Your rules text</p>
    </div>
  </div>
</div>

<script type='text/javascript'>
  $('shoutbox-rules-button').observe( 'click', function(e) {
    _var = new ipb.Popup( 'booboo', { type: 'pane',
						   initial: $('shoutbox-rules').innerHTML,
						   hideAtStart: false} );

    Event.stop(e);

    return false;
  });
</script>

Effect:

77984599229845276204.jpg

  • Upvote 8
Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...
  • 2 months later...

Thanks man +Rep

<p style="text-align: center;">
    <img alt="newforumsig2a8b7.png" class="ipsImage" src="https://technologx.com/applications/core/interface/imageproxy/imageproxy.php?img=http://upicme.technologx.com/images/newforumsig2a8b7.png&amp;key=39dac093df23a0bac3413cace79b784bbd9c7b204556aeca70f3d3b64bd6f656">
</p>
Be sure to click the green up arrow if I've helped you any or you like my uploads. Thank you it really helps! Also if possible if you download my files please review them thank you?
Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...
  • 4 weeks later...
×
×
  • Create New...