PDA

View Full Version : BB Code Enhancements - Blink BBCode- The Ultimate BB Code!


BirdOPrey5
07-29-2010, 10:00 PM
Back in the day Netscape made the <blink> tag, and it was good...
But then all the hater's rose up and effectively destroyed the humble <blink> tag in an attempt to strip it of its pure awesomeness and erase any trace of its existence from history. This can not be allowed to happen so I present the BLINK BB Code... There is another Blink BB Code for 3.7 but problems have been reported using it in 3.8 while this one works in 3.8 and 4. You also don't need to disable other bbcode or smilies like in the original version.

NEW!!! - See Post #3 for a version that works in all major web browsers.

It is currently working in IE, Firefox, and Opera. It is not working in Safari and Chrome, for my site that is less than 12% of all traffic so I can deal with some people not seeing this amazing tag... for them text just won't blink, there is no error. It requires JavaScript to be active.

This is based off of code found here (http://www.siteexperts.com/tips/html/ts12/page2.asp) and their copyright remains intact. I have made some additions for increased compatibility.

Demo: here. (http://www.juot.net/forums/showthread.php?p=826483#post826483)

Add a new BBCode

Title: Blink
BB Code Tag Name: blink
Replacement:

<SCRIPT>
// Before you reuse this script you may want to have your head examined
//
// Copyright 1999 InsideDHTML.com, LLC.

function doBlink() {
// Blink, Blink, Blink...
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() {
// Make sure it is IE4
if (document.all)
setInterval("doBlink()",1000)
}
window.onload = startBlink;
</SCRIPT>
<blink>{param}</blink>


Example: test blink
Description: This code makes text Blink in IE, FF, and Opera
Use Option: No
Button Image: (optional) https://vborg.vbsupport.ru/attachment.php?attachmentid=119362&stc=1&d=1278519480
Remove Tag If Empty: Yes
All Disable Options: No

Unlike the other blink bbcode you can have line-breaks in this code...

line 1
line 2

works just as well as line 1. line 2.

Please mark as installed if you use this. :)
Check My Profile (https://vborg.vbsupport.ru/member.php?u=258922) for other BB Code enhancements. They work on all versions.

goxy63
07-31-2010, 11:44 AM
Nice thank you

BirdOPrey5
08-16-2010, 03:22 AM
I have a new version that works in ALL major browsers including: IE / Firefox / Chrome / Opera and Safari! This is a little more complicated to implement so if you're happy with the existing tag there is no NEED to upgrade, however this new version works on more (all) browsers.

It makes use of the jquery javascript library built into VB4.

Step 1. Download the attachment, unzip, and upload the .js file it to your /clientscript/jquery/ directory. (This may be under /forums/clientscript/jquery/ or any other directory you have your forums installed in.)

Step 2. Admin CP -> Styles and Templates -> Style Manger -> Choose your style(s) -> All Style Options: Edit your headinclude template and add the following code at the bottom of it:

<!-- Start Blinking Text jquery Script-->
<script src="/forums/clientscript/jquery/jquery-1.3.min.js" language="javscript" type="text/javascript"></script>
<script src="/forums/clientscript/jquery/jquery-blink.js" language="javscript" type="text/javascript"></script>
<script type="text/javascript" language="javascript">
$(document).ready(function()
{
$('.blink').blink();
});
</script>
<!-- End Blinking Text jquery Script-->

Make sure you change the file paths to the .js files to match your directory setup. For me it's "/forums/clientscript/filename.js" If your forums are in your web root your location may be just "/clientscript/filename.js".

jquery-1.3.min.js is already installed in your /clientscript/jquery/ directory.

Step 3. Make a new BB Code using the instructions in the first post or edit your existing blink bb code. Use the following replacement code instead of the replacement in the first post. (much shorter):
<span class="blink">{param}</span>

Save your new or edited BB Code and you're done. You know have a [bkink] tag that works in all major browsers.

Note: Updated to use VB4's built in jquery file.

Boofo
08-16-2010, 03:36 AM
You could also do this and not have to worry about staying up-to-date on jquery.

<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>

Also, a text file with the instructions would be nice, too, so users didn't have to always come back here for installation instructions in case it ever needed to be re-installed.

Boko577
08-16-2010, 04:50 AM
Pretty cool, but how could I get the password box like on the demo page?

sulasno
08-16-2010, 11:28 AM
installed and working in 4.0.6

I do agree with Boofo that instructions for installation should accompany the download of the js

BirdOPrey5
08-16-2010, 01:13 PM
You could also do this and not have to worry about staying up-to-date on jquery.


That is certainly possible although I usually prefer to host all files locally if at all possible so I'm not dependent on someone else's servers, no matter how reliable they are.

Pretty cool, but how could I get the password box like on the demo page?

I'll PM you the info on Password but I didn't create it so I'm not posting it... it's actually pretty useless though, if someone quotes the message they'd see the password. :eek:

installed and working in 4.0.6

I do agree with Boofo that instructions for installation should accompany the download of the js

I will start providing downloadable instructions for my mods, I have a few to catch up on... in the mean time you could always copy and paste the info from the relevant post into a text file and save it if you're worried you may lose access.

BirdOPrey5
08-16-2010, 05:20 PM
Updated to latest jquery release...you don't need to upgrade but it's in the new zip if you want it.

Boofo
08-16-2010, 05:51 PM
Just FYI, there is a new directory in vb 4 now:
\forums\clientscript\jquery\

It contains 5 files:
jquery.droppy.js
jquery.floatbox.js
jquery.styledselect.js
jquery.tooltip.js
jquery-1.3.min.js

I don lt remember seeing that in vb3, but it has been a while.

BirdOPrey5
08-16-2010, 06:17 PM
Thanks Boofo, I didn't even think to look if VB4 shipped with jquery (vb3 does not) - I've updated the instructions once again to make use of the file that's already there.

Boofo
08-16-2010, 06:41 PM
To be totally honest, I was surprised to find that directory in vb 4. Maybe vb 4 is finally going in the right direction using jquery.

as7apcool
08-16-2010, 07:03 PM
thanks 4 good work

BirdOPrey5
08-16-2010, 07:13 PM
To be totally honest, I was surprised to find that directory in vb 4. Maybe vb 4 is finally going in the right direction using jquery.

What's funny is it's there but not being called by the forum, I still had to add the line to load it in the header include.

thanks 4 good work

your welcome- but really the thanks should go to the good people who designed the jquery package - I just found this and thought it would be good for us VB folk.

COL NIL SATIS
11-18-2010, 01:49 PM
Thanks man,this is cool.

Dr.osamA
11-29-2010, 04:05 AM
5 Stars

installed

working with 4.1.0

thank you bro

Martinoo
12-26-2010, 05:27 PM
thanks, installed working with 4.0.7

RK KINGKONG
01-21-2011, 10:03 PM
great & THANKS working great on all browsers running VB 4.1.1 im very fond of this one I have a new version that works in ALL major browsers including: IE / Firefox / Chrome / Opera and Safari! This is a little more complicated to implement so if you're happy with the existing tag there is no NEED to upgrade, however this new version works on more (all) browsers.

It makes use of the jquery javascript library built into VB4.

Step 1. Download the attachment, unzip, and upload the .js file it to your /clientscript/jquery/ directory. (This may be under /forums/clientscript/jquery/ or any other directory you have your forums installed in.)

Step 2. Admin CP -> Styles and Templates -> Style Manger -> Choose your style(s) -> All Style Options: Edit your header include template and add the following code at the bottom of it:

<!-- Start Blinking Text jquery Script-->
<script src="/forums/clientscript/jquery/jquery-1.3.min.js" language="javscript" type="text/javascript"></script>
<script src="/forums/clientscript/jquery/jquery-blink.js" language="javscript" type="text/javascript"></script>
<script type="text/javascript" language="javascript">
$(document).ready(function()
{
$('.blink').blink();
});
</script>
<!-- End Blinking Text jquery Script-->

Make sure you change the file paths to the .js files to match your directory setup. For me it's "/forums/clientscript/filename.js" If your forums are in your web root your location may be just "/clientscript/filename.js".

jquery-1.3.min.js is already installed in your /clientscript/jquery/ directory.

Step 3. Make a new BB Code using the instructions in the first post or edit your existing blink bb code. Use the following replacement code instead of the replacement in the first post. (much shorter):
<span class="blink">{param}</span>

Save your new or edited BB Code and you're done. You know have a [bkink] tag that works in all major browsers.

Note: Updated to use VB4's built in jquery file.

johkalhaups
04-25-2011, 02:28 PM
<a href="http://www.theriseoftsm.com/forums/index.php" target="_blank">http://www.theriseoftsm.com/forums/index.php</a>

Just installed the version from post 3 on my forums and its not working in Chrome for me on vB 4.1.3.

Weird thing is, your demo site from the 1st post works just fine (yes I tried the version in the op 1st and it didnt work either).

BirdOPrey5
04-25-2011, 04:41 PM
What was the exact code you used ?(since per the instructions you need to customize the file paths/names for your forum.)

johkalhaups
04-25-2011, 05:57 PM
My file paths were the same as yours so I left it alone.




EDIT: My bad, I was just going by the little preview box in the AdminCP.

I did it in a post and it works fine. :)

craigvm
12-01-2012, 09:59 PM
installed but not working on any browsers

BirdOPrey5
12-02-2012, 09:08 PM
installed but not working on any browsers

Did you try the version in Post #3?

faisaly.com
12-02-2012, 09:29 PM
This bbcode work using vB4.2.0 very well... props to the Bird!

https://vborg.vbsupport.ru/attachment.php?attachmentid=142628&stc=1&d=1354488408

fxdigi-cash
12-15-2012, 05:48 AM
I just tested it today on my vb4.2 English version and it worked fine, but other language vb4.2 doesn't work... any idea why??

Thanks

BirdOPrey5
12-18-2012, 06:59 PM
No idea... did you try it in English on the same board to see if the language really was the problem?

fxdigi-cash
12-20-2012, 03:30 AM
No idea... did you try it in English on the same board to see if the language really was the problem?

Hi Bird

Thanks for the comments. now it works fine. It seems that my other language forum has some bug with some plugin at the datastore in the DB. I just had to re-installed a new versions without any plugin.

Thanks again.

Cheers

Easy5s.net
06-27-2013, 12:08 PM
not work with opera :)

1320Nation
08-13-2013, 07:26 PM
I have a new version that works in ALL major browsers including: IE / Firefox / Chrome / Opera and Safari! This is a little more complicated to implement so if you're happy with the existing tag there is no NEED to upgrade, however this new version works on more (all) browsers.

It makes use of the jquery javascript library built into VB4.

Step 1. Download the attachment, unzip, and upload the .js file it to your /clientscript/jquery/ directory. (This may be under /forums/clientscript/jquery/ or any other directory you have your forums installed in.)

Step 2. Admin CP -> Styles and Templates -> Style Manger -> Choose your style(s) -> All Style Options: Edit your header include template and add the following code at the bottom of it:

<!-- Start Blinking Text jquery Script-->
<script src="/forums/clientscript/jquery/jquery-1.3.min.js" language="javscript" type="text/javascript"></script>
<script src="/forums/clientscript/jquery/jquery-blink.js" language="javscript" type="text/javascript"></script>
<script type="text/javascript" language="javascript">
$(document).ready(function()
{
$('.blink').blink();
});
</script>
<!-- End Blinking Text jquery Script-->

Make sure you change the file paths to the .js files to match your directory setup. For me it's "/forums/clientscript/filename.js" If your forums are in your web root your location may be just "/clientscript/filename.js".

jquery-1.3.min.js is already installed in your /clientscript/jquery/ directory.

Step 3. Make a new BB Code using the instructions in the first post or edit your existing blink bb code. Use the following replacement code instead of the replacement in the first post. (much shorter):
<span class="blink">{param}</span>

Save your new or edited BB Code and you're done. You know have a [bkink] tag that works in all major browsers.

Note: Updated to use VB4's built in jquery file.

I was unable to get this working in VB version 4.2.1. In post #3 it refers to "header include template". I was unable to locate that template name. Surely the header include is not a type o with nobody else pointing it out before now.

BirdOPrey5
08-17-2013, 11:17 AM
The actual template name is headinclude, I will update the post, thank you.

TheChief
08-17-2013, 12:41 PM
Just followed all the instructions and cant get it to work on chrome using vbull 4.2.1

Any suggestions, i tried both the long and short replacement code

Thanks

TheChief
08-19-2013, 10:18 AM
Removed

1320Nation
10-10-2013, 01:18 AM
Is there any code that can be added so this will also work with " < " and " > "? As it is now it works fine when able to use the " [ " and " ] ".

angeljs
10-13-2013, 05:38 PM
Installed on vBulletin 4.2. The code sort of works, but it shows the text twice, one blinking and one not. Is this what it's supposed to do?

fxdigi-cash
07-03-2014, 07:26 PM
tried it on vb4.2.2 pl1, but doesn't work... no blinking

fxdigi-cash
07-03-2014, 08:30 PM
since that code didn't work for me and still don't know why!!

here is the replacement code I used:

<script type="text/javascript" language="javascript"> window.onload=blinkOn; function blinkOn() { document.getElementById("blink").style.color="#CCC" setTimeout("blinkOff()",1000) } function blinkOff() { document.getElementById("blink").style.color="" setTimeout("blinkOn()",1000) } </script>
<div id="blink"><blink>{param}</blink></div>

twistedsoul
05-30-2016, 06:53 PM
doesn't seem to work for me in ie chrome or edge...