How to add "Rules" button to shoutbox

by e8iw2f3 - 15-01-2015, 05:10 AM
Posts:
92
Joined:
Jan 2015
Likes:
6
Credits:
176
Reputation:
5
2 Years of Service
#1
OP
Posted: 15-01-2015, 05:10 AM (This post was last modified: 26-06-2016, 03:52 AM by e8iw2f3.)
Please register or login in order to unlock hidden content.
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]
The last reply on this thread is older than a month. Please do not unnecessarily bump it.
Register an account or login to reply
Create an account
Create a free account today and start posting right away. It only takes a few seconds.
Login
Log into an existing account.
1 Guest(s)