============================================================================================================================
Modification Name: BB Code: Blinking Text

Version: 1.0

Description: This modification will add a BB code button for inserting blinking text in posts.

Compatibility: XMB 1.9.5 SP1

Code Developed By: Ahmad

Code Contributors: Adam Clarke - Added code to enable blinking text in Internet Explorer.

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: Blinking Text Mod Begin
function blink() {
    if (helpmode) {
        alert(bbcode_help_blink);
    }else if (advmode) {
        AddText('', '', "[blink] [/blink]", messageElement);
    }else {
        txt=prompt(bbcode_prompt_blink,"Text");
        if (txt!=null) {
            AddText('', '', "[blink]"+txt+"[/blink]", messageElement);
        }
    }
}
// BB Code: Blinking Text Mod End

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

function storeCaret(textEl) {

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

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

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

function storeCaret() {

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

// BB Code: Blinking Text Mod Begin
function blink() {
    if(helpmode) {
        alert(bbcode_help_blink);

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

    } else {
        if(hasSelection(messageElement)) {
            text = prompt(bbcode_prompt_blink, fetchSelection(messageElement));
            if(text == fetchSelection(messageElement)) {
                wrapText('[blink=500x400]', '[/blink]', messageElement);
            } else {
                AddText('[blink=500x400]', '[/blink]', text, messageElement);
            }
        } else {
            text = prompt(bbcode_prompt_blink, 'Text');
            AddText('[blink]', '[/blink]', text, messageElement);
        }
    }
}
// BB Code: Blinking Text Mod End

============================================================================================================================
=======
Step 4:
=======
====================
Edit File: include/header.js
====================
==========
Find Code:
==========

self.name = 'mainwindow';

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

// BB Code: Blinking Text Mod Begin
function doBlink() {
    var blink = document.all.tags("BLINK");
    for (var i=0; i<blink.length; i++)
        blink[i].style.visibility = blink[i].style.visibility == "" ? "hidden" : "";
}

function startBlink() {
    if (document.all)
        setInterval("doBlink()",1000);
}
window.onload = startBlink();
// BB Code: Blinking Text Mod End

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

// BB Code Blinking Text Mod Begin
$lang['bbcode_help_blink'] = "Blink Tag\\nInsert Blinking Text.\\nUsage: [b]This is some Blinking Text[/b]";
$lang['bbcode_prompt_blink'] = "Please enter the Blinking text";
$lang['cb_insert_blink'] = "Insert Blinking Text";
// BB Code Blinking Text Mod End

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

var messageElement;

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

var bbcode_help_blink	= "$lang[bbcode_help_blink]";
var bbcode_prompt_blink = "$lang[bbcode_prompt_blink]";

============================================================================================================================
=======
Step 7: 
=======
===============================
Go To Administration Panel --> Templates
===============================
============================
Edit Template: functions_bbcodeinsert
============================
==========
Find Code:
==========

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

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

<a href="javascript:list()"><img src="$imgdir/bb_list.gif" border="0" width="23" height="22" alt="$lang[cb_insert_list]" /></a>
<a href="javascript:blink()"><img src="$imgdir/bb_blink.gif" border="0" width="23" height="22" alt="$lang[cb_insert_blink]" /></a></td>

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

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

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