============================================================================================================================
Modification Title: BB Code: Striking Text v1.0

Author: Ahmad

Description: This modification will add a button to the BB Code buttons to insert striked text into your post.

Compatability: 1.9.5 SP1

Bonus: White button theme

Install Note: Before adding this modification to your forum, you should back up all files related to this modification.

License Note: This modification is released under the GPL License v3. A copy is provided with this software package.

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

Author Note:
You downloaded this modification from XMBGarage.com, the #1 source for XMB related downloads.
Please visit http://www.xmbgarage.com/ for support.
============================================================================================================================
=======
Step 1:
=======
========================
Edit File: include/bbcodefns-ie.js
========================
==========
Find Code:
==========

function storeCaret(textEl) {

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

// BB Code: Striking Text Mod Begin
function strike() {
    if (helpmode) {
        alert(bbcode_help_strike);
    }else if (advmode) {
        AddText('', '', "[strike] [/strike]", messageElement);
    } else {
        txt=prompt(bbcode_prompt_strike,"Text");
        if (txt!=null) {
            AddText('', '', "[strike]"+txt+"[/strike]", messageElement);
        }
    }
}
// BB Code: Striking Text Mod End

============================================================================================================================
=======
Step 2:
=======
===========================
Edit File: include/bbcodefns-opera.js
===========================
==========
Find Code:
==========

function storeCaret(textEl) {

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

// BB Code: Striking Text Mod Begin
function strike() {
    if (helpmode) {
        alert(bbcode_help_strike);
    }else if (advmode) {
        AddText('', '', "[strike] [/strike]", messageElement);
    } else {
        txt=prompt(bbcode_prompt_strike,"Text");
        if (txt!=null) {
            AddText('', '', "[strike]"+txt+"[/strike]", messageElement);
        }
    }
}
// BB Code: Striking Text Mod End

============================================================================================================================
=======
Step 3:
=======
============================
Edit File: include/bbcodefns-mozilla.js
============================
==========
Find Code:
==========

function storeCaret() {

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

// BB Code: Striking Text Mod Begin
function strike() {
    if (helpmode) {
        alert(bbcode_help_strike);

    }else if (advmode) {
        if (hasSelection(messageElement)) {
            wrapText('[strike]', '[/strike]', messageElement);
        }else {
            AddText('[strike]', '[/strike]', ' ', messageElement);
        }

    }else {
        if (hasSelection(messageElement)) {
            text = prompt(bbcode_prompt_strike, fetchSelection(messageElement));
            if (text == fetchSelection(messageElement)) {
                wrapText('[strike]', '[/strike]', messageElement);
            }else {
                AddText('[strike]', '[/strike]', text, messageElement);
            }
        }else {
            text = prompt(bbcode_prompt_strike, 'Text');
            AddText('[strike]', '[/strike]', text, messageElement);
        }
    }
}
// BB Code: Striking Text Mod End

============================================================================================================================
=======
Step 4:
=======
=======================
Edit File: lang/English.lang.php
=======================
=============================
Add Code To End Of File ABOVE  ?>
=============================

// BB Code Strike Text Mod Begin
$lang['bbcode_help_strike'] = "strike Tag\\nInsert text to be Striked out.\\nUsage: [b]This is some Striked out text.[/b]";
$lang['bbcode_prompt_strike'] = "Enter the text to Strike.";
$lang['cb_insert_strike'] = "Insert text to Strike";
// BB Code Strike Text Mod End

============================================================================================================================
=======
Step 5:
=======
===============================
Go To Administration Panel --> Templates
===============================
=========================
Edit Template: functions_bbcode
=========================
==========
Find Code:
==========

var messageElement;

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

var bbcode_help_strike	= "$lang[bbcode_help_strike]";
var bbcode_prompt_strike = "$lang[bbcode_prompt_strike]";


============================================================================================================================
=======
Step 6:
=======
===============================
Go To Administration Panel --> Templates
===============================
=============================
Edit Template: functions_bbcode_insert
=============================
==========
Find Code:
==========

<a href="javascript:code()"><img src="$imgdir/bb_code.gif" border="0" width="23" height="22" alt="$lang[cb_insert_code]" /></a></td>

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

<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:strike()"><img src="$imgdir/bb_strike.gif" border="0" width="23" height="22" alt="$lang[cb_insert_strike]" /></a></td>

============================================================================================================================
=======
Step 7:
=======

Upload the image 'bb_strike.gif' to all of your theme folders.

============================================================================================================================
Enjoy!