Hack Name: BB Code Tips v2.0

Hack Author: GuldantheWarlock (GuldantheWarlock@xmbgarage.com)

Updated for 1.9.5 by WormHole

Original Author: John Clawson

Last Updated: September 25, 2006

Hack Description:
This hack will add a message box below the bbcode buttons that displays bb code tips when moused over.
This hack has been modified to work if the Member Control Panel BB Code hack is installed.

Supported Version: XMB 1.9.5 Nexus

Notes:

This hack is released under the GPL. You should have recieved a copy of it with this hack.

Please backup your files before installing this hack. Neither XMBGarage nor the author can be held 
responsible if your board stops functioning properly due to you installing this hack.

=======================================================================================================

=======
Step 1:
=======

===========================
Edit lang/English.lang.php:
===========================

===================
Add to end of file:
===================

$lang['bbcode_tips'] = "BBCode Tips";
$lang['default_tip'] = "Tip: Roll your mouse cursor over any of the BB Code above!";
$lang['bold_tip'] = "Bold Text: [b]Text[/b]";
$lang['italic_tip'] = "Italicized Text: [i]Text[/i]";
$lang['underline_tip'] = "Underlined Text: [u]Text[/u]";
$lang['center_tip'] = "Centered Text: [align=center]Text[/align]";
$lang['quote_tip'] = "Quoted Text: [quote]Text[/quote]";
$lang['code_tip'] = "Code Formatted Text: [code]Text[/code]";
$lang['list_tip'] = "List Text: [list][*]Text[*]Text[/list]";
$lang['image_tip'] = "Insert Image: [img]http://url[/img]";
$lang['url_tip'] = "Insert URL: [url]http://url[/url] or [url=http://url]Text[/url]";
$lang['email_tip'] = "Insert Email: [email]name@domain.com[/email] or [email=name@domain.com]Text[/url]";
$lang['font_tip'] = "Font: [font=arial]Text[/font]";
$lang['color_tip'] = "Font Color: [color=red]Text[/color]";
$lang['size_tip'] = "Font Size: [size=1]Text[/size]";

=======================================================================================================

=======
Step 2:
=======

=======================================
Go to Administration Panel -> Templates
=======================================

==============================
Edit Template functions_bbcode
==============================

=====
Find:
=====

var bbcode_help_underline   = "$lang[bbcode_help_underline]";
var bbcode_prompt_underline = "$lang[bbcode_prompt_underline]";

==========
Add Below:
==========

var bold_tip = "$lang[bold_tip]";
var italic_tip = "$lang[italic_tip]";
var underline_tip = "$lang[underline_tip]";
var center_tip = "$lang[center_tip]";
var quote_tip = "$lang[quote_tip]";
var code_tip = "$lang[code_tip]";
var list_tip = "$lang[list_tip]";
var image_tip = "$lang[image_tip]";
var url_tip = "$lang[url_tip]";
var email_tip = "$lang[email_tip]";
var font_tip = "$lang[font_tip]";
var color_tip = "$lang[color_tip]";
var size_tip = "$lang[size_tip]";

function tipline(tip) {
    document.getElementById('tipline').innerHTML = eval(tip+'_tip');
}

=======================================================================================================

=======
Step 3:
=======

=======================================
Go to Administration Panel -> Templates
=======================================

====================================
Edit Template functions_bbcodeinsert
====================================

=====
Find:
=====

<select name="font" onChange="chfont(this.options[this.selectedIndex].value)" size="1">

=============
Replace With:
=============

<select name="font" onChange="chfont(this.options[this.selectedIndex].value)" size="1" onMouseOver="tipline('font')">

=====
Find:
=====

<select name="size" onChange="chsize(this.options[this.selectedIndex].value)" size="1">

=============
Replace With:
=============

<select name="size" onChange="chsize(this.options[this.selectedIndex].value)" size="1" onMouseOver="tipline('size')">

=====
Find:
=====

<select name="color" onChange="chcolor(this.options[this.selectedIndex].value)" size="1">

=============
Replace With:
=============

<select name="color" onChange="chcolor(this.options[this.selectedIndex].value)" size="1" onMouseOver="tipline('color')">

=====
Find:
=====

<a href="javascript:bold()" accesskey="b"><img src="$imgdir/bb_bold.gif" border="0" width="23" height="22" alt="$lang[cb_insert_bold]" /></a>
<a href="javascript:italicize()" accesskey="i"><img src="$imgdir/bb_italicize.gif" border="0" width="23" height="22" alt="$lang[cb_insert_italics]" /></a>
<a href="javascript:underline()" accesskey="u"><img src="$imgdir/bb_underline.gif" border="0" width="23" height="22" alt="$lang[cb_insert_underlined]" /></a>
<a href="javascript:center()"><img src="$imgdir/bb_center.gif" border="0" width="23" height="22" alt="$lang[cb_insert_centered]" /></a>
<a href="javascript:hyperlink()"><img src="$imgdir/bb_url.gif" border="0" width="23" height="22" alt="$lang[cb_insert_hyperlink]" /></a>
<a href="javascript:email()"><img src="$imgdir/bb_email.gif" border="0" width="23" height="22" alt="$lang[cb_insert_email]" /></a>
<a href="javascript:image()"><img src="$imgdir/bb_image.gif" border="0" width="23" height="22" alt="$lang[cb_insert_image]" /></a>
<a href="javascript:code()"><img src="$imgdir/bb_code.gif" border="0" width="23" height="22" alt="$lang[cb_insert_code]" /></a>
<a href="javascript:quote()"><img src="$imgdir/bb_quote.gif" border="0" width="23" height="22" alt="$lang[cb_insert_quote]" /></a>
<a href="javascript:list()"><img src="$imgdir/bb_list.gif" border="0" width="23" height="22" alt="$lang[cb_insert_list]" /></a></td>

=============
Replace With:
=============

<a href="javascript:bold()" onMouseOver="tipline('bold')" accesskey="b"><img src="$imgdir/bb_bold.gif" border="0" width="23" height="22" alt="$lang[cb_insert_bold]" /></a>
<a href="javascript:italicize()" onMouseOver="tipline('italic')" accesskey="i"><img src="$imgdir/bb_italicize.gif" border="0" width="23" height="22" alt="$lang[cb_insert_italics]" /></a>
<a href="javascript:underline()" onMouseOver="tipline('underline')" accesskey="u"><img src="$imgdir/bb_underline.gif" border="0" width="23" height="22" alt="$lang[cb_insert_underlined]" /></a>
<a href="javascript:center()" onMouseOver="tipline('center')"><img src="$imgdir/bb_center.gif" border="0" width="23" height="22" alt="$lang[cb_insert_centered]" /></a>
<a href="javascript:hyperlink()" onMouseOver="tipline('url')"><img src="$imgdir/bb_url.gif" border="0" width="23" height="22" alt="$lang[cb_insert_hyperlink]" /></a>
<a href="javascript:email()" onMouseOver="tipline('email')"><img src="$imgdir/bb_email.gif" border="0" width="23" height="22" alt="$lang[cb_insert_email]" /></a>
<a href="javascript:image()" onMouseOver="tipline('image')"><img src="$imgdir/bb_image.gif" border="0" width="23" height="22" alt="$lang[cb_insert_image]" /></a>
<a href="javascript:code()" onMouseOver="tipline('code')"><img src="$imgdir/bb_code.gif" border="0" width="23" height="22" alt="$lang[cb_insert_code]" /></a>
<a href="javascript:quote()" onMouseOver="tipline('quote')"><img src="$imgdir/bb_quote.gif" border="0" width="23" height="22" alt="$lang[cb_insert_quote]" /></a>
<a href="javascript:list()" onMouseOver="tipline('list')"><img src="$imgdir/bb_list.gif" border="0" width="23" height="22" alt="$lang[cb_insert_list]" /></a>

<br /><br />

<font class="smalltxt">$lang[bbcode_tips]</font>
<span id="tipline">$lang[default_tip]</span></td>

=======================================================================================================

=======
Step 4:
=======

=======================================
Go to Administration Panel -> Templates
=======================================

=================
Edit template css
=================

=====
Find:
=====

/*]]>*/
</style>

==========
Add Above:
==========

.tipline {
    border-style: none;
    background-color: $altbg2;
}

=======================================================================================================

Enjoy!