vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   BB Code Enhancements - Text Typer BBCode (https://vborg.vbsupport.ru/showthread.php?t=260736)

Thelonius Beck 03-20-2011 10:00 PM

Text Typer BBCode
 
1 Attachment(s)
The Text Typer BB Code For vBulletin
by Thelonius Beck

***NOTE: Though I've indicated vB Version 3.8.x, there is no reason that this should not work in ANY vB version.***

For this fun and simple BB Code, you need only upload one (1) file, make a single template edit, and add a single CSS definition.
Let's get started.
  1. First we upload the 'js' file to our forum root directory. For me, this is the 'public_html' directory, but yours may well be 'public_html/forum' or 'public_html/forums'.
  2. Now we open our Admin CP > Styles & Templates > Style Manager > All Style Options (making sure to choose the correct style)
    Add to the bottom of your 'headinclude' template:
    Code:

    <!-- Text Typer -->
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
    <script type="text/javascript" src="js/TypingText.js">>
    /****************************************************
    * Typing Text script- By Twey @ Dynamic Drive Forums
    * Visit Dynamic Drive for this script and more: http://www.dynamicdrive.com
    * This notice MUST stay intact for legal use
    ****************************************************/
    </script>
    <script type="text/javascript">
    jQuery(function($){
        var typrs = $('.typer'), typng = [], tl = typrs.length, typr = 0;
        typrs.each(function(i){
            typng[i] = [$(this), new TypingText(this, 100, '_', delayType)];
        });
        function typeThem(){
            typrs.hide();
            typng[typr = typr % tl][0].show();
            typng[typr++][1].run();
        }
        function delayType(){
            setTimeout(typeThem, 3000);
        }
        typeThem();
    });
    </script>
    <!--/Text Typer -->

  3. If you like, you can preformat the Text Typer by adding code to your 'Additional CSS Definitions'. It's not required, but I think it adds to the effect.

    I was going for an "80's Sci Fi thinking computer" look with mine. Looks great on my black background. You do what looks best for your style(s).
    Code:

    /* ***** Text Typer ***** */

    .typer{
        font-family: lucida console;
        font-weight: bold;
        color: #00ff00;
    }

    *Click Save* (NOTE: If you use multiple styles, you will need to repeat steps 2 & 3 for each style you use.)
  4. Now, for the final step, we go Admin CP > Custom BB Codes > Add New BB Code.
    • Title:
      Code:

      Text Typer
    • BB Code Tag Name:
      Code:

      typer
    • Replacement:
      Code:

      <span class="typer">{param}</span>
    • Example:
      Code:

      [typer]Your Text Here...[/typer]
    • Description:
      Code:

      Self typing text effect.
    • Use {option}:
      Code:

      No
    • Button Image (Optional):
      Code:

      I Really Have No Idea What A 'Text Typer' Button Should Look Like, So Suggestions Are Welcome
    • Remove Tag If Empty:
      Code:

      Yes
    • Disable BB Code Within This BB Code:
      Code:

      Yes
    • Disable Smilies Within This BB Code:
      Code:

      Yes
    • Disable Word Wrapping Within This BB Code:
      Code:

      No
    *Click Save* and we're done.
Now for the 'important' bit.
This code is specifically designed to show one(1) instance of the text typer effect at a time. Meaning that if more than one post on a page contains the [typer] code, they will take turns displaying it. Also, being Java based, the effect will not show on 'Quick Reply' until the page is refreshed.

Please Note: I did not write the Text Typer script. I merely made it work as a vBulletin BB Code.
The Typing Text script utilized for this BB Code was written by 'Twey' at Dynamic Drive, and is available for download HERE. He has attached a notice of authorship to the code, and I have to ask that you DO NOT REMOVE IT.
The jQuery functions were done by 'jscheuer1', also at Dynamic Drive. You can find the original code posted HERE.

For a preview of the functioning BBCode go HERE

sulasno 03-21-2011 04:22 PM

tagged and thanks

looks cool

Thelonius Beck 03-21-2011 05:36 PM

Great, glad you like it. I know it's a silly little feature, but it's fun. I just hope someone gets some use out of it.

Alfa1 03-23-2011 12:35 AM

Actually I have been searching for something very similar for years. Is there any chance that you would release a typing ticker? Similar to this, but typing:
vB News Ticker - Your Blogs RSS Feeds and Forums in a Marquee

Hornstar 03-23-2011 06:47 AM

Awesome!

Hornstar 03-23-2011 07:08 AM

Update, Tried everything, refreshed page several times. It does not seem to parse the bbcode. Instead I see in the post [typer]words words words[/typer]

Thelonius Beck 03-23-2011 01:28 PM

Quote:

Originally Posted by Alfa1 (Post 2176385)
Actually I have been searching for something very similar for years. Is there any chance that you would release a typing ticker? Similar to this, but typing:
vB News Ticker - Your Blogs RSS Feeds and Forums in a Marquee

That's a really great idea. I'll look into it. :cool:

EDIT: Do you already have a news ticker installed?

Thelonius Beck 03-23-2011 01:49 PM

Quote:

Originally Posted by Hornstar (Post 2176466)
Update, Tried everything, refreshed page several times. It does not seem to parse the bbcode. Instead I see in the post [typer]words words words[/typer]

Hmmm...odd.

The only thing I can think of that would cause that is incorrect BBCode parameters.

I even went so far as to remove the JavaScipt document & mess up the code in my 'headinclude' template and could not reproduce the issue.

As far as I know, even if you have it set to do nothing whatsoever, your BBCode should parse as long as what's in your tag matches what's in the 'BB Code Tag Name:' field.

Is there any way you could provide a link to an example of the failure? PMs accepted in case you don't want to post the link here.

Thelonius Beck 03-23-2011 02:07 PM

Very Minor Update: (not enough for a version change)

I noticed that I had left an unnecessary <div></div> around the replacement code in the instructions.

Post & ReadMe file changed to reflect this.

Hornstar 03-23-2011 07:35 PM

Quote:

Originally Posted by Thelonius Beck (Post 2176545)
Hmmm...odd.

The only thing I can think of that would cause that is incorrect BBCode parameters.

I even went so far as to remove the JavaScipt document & mess up the code in my 'headinclude' template and could not reproduce the issue.

As far as I know, even if you have it set to do nothing whatsoever, your BBCode should parse as long as what's in your tag matches what's in the 'BB Code Tag Name:' field.

Is there any way you could provide a link to an example of the failure? PMs accepted in case you don't want to post the link here.

Thanks for taking a look.
http://www.gamerzneeds.net/forums/sp...ml#post1659611


All times are GMT. The time now is 09:01 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.01201 seconds
  • Memory Usage 1,751KB
  • 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
  • (13)bbcode_code_printable
  • (3)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