vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   BB Code Enhancements - Blink BBCode- The Ultimate BB Code! (https://vborg.vbsupport.ru/showthread.php?t=247607)

BirdOPrey5 07-29-2010 10:00 PM

Blink BBCode- The Ultimate BB Code!
 
1 Attachment(s)
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 and their copyright remains intact. I have made some additions for increased compatibility.

Demo: here.

Add a new BBCode

Title: Blink
BB Code Tag Name: blink
Replacement:
Code:

<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: [blink]test blink[/blink]
Description: This code makes text Blink in IE, FF, and Opera
Use Option: No
Button Image: (optional) https://vborg.vbsupport.ru/attachmen...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...
[blink]
line 1
line 2
[/blink]
works just as well as [blink]line 1. line 2.[/blink]

Please mark as installed if you use this. :)
Check My Profile 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

1 Attachment(s)
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:
Code:

<!-- 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):
Code:

<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.

Quote:

<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

Quote:

Originally Posted by Boofo (Post 2084598)
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.

Quote:

Originally Posted by Boko577 (Post 2084619)
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:

Quote:

Originally Posted by sulasno (Post 2084722)
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:
Quote:

\forums\clientscript\jquery\
It contains 5 files:
Quote:

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.


All times are GMT. The time now is 07:11 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03252 seconds
  • Memory Usage 1,747KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete