IP.Board Tutorials

How to add "Rules" button to shoutbox

Submitted by e8iw2f3, , Thread ID: 30

Thread Closed
e8iw2f3
Member
Level:
1
Reputation:
17
Posts:
177
Likes:
13
Credits:
156
15-01-2015, 05:10 AM
This post was last modified: 26-06-2016, 03:52 AM by e8iw2f3
#1
Content locked
This content has been locked. Please login or register in order to unlock it.
Step 1.
Admin CP > Look & Feel > Select Template > skin_shoutbox_hooks > hookGlobalShoutbox
Find:
Code:
<input type='button' id='shoutbox-myprefs-button' value='{$this->lang->words['my_prefs']}' class='input_submit alt' />
Add below:
Code:
<input type='button' id='shoutbox-rules-button' value='{$this->lang->words['board_rules']}' class='right input_submit alt' />
Step 2.
Find:
Code:
<script type='text/javascript'>
//<![CDATA[
{$d['js']}
//]]>
</script>
Add below:
Code:
<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>
[/hide]

Users browsing this thread: 1 Guest(s)