vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   BB Code Enhancements - Text Fade (Rainbow Faded Text) BBCode (https://vborg.vbsupport.ru/showthread.php?t=246569)

BirdOPrey5 08-08-2010 12:13 PM

If you're able to upload files (usually via FTP) then you don't need any special permissions to upload javascript (.js) files.

COL NIL SATIS 08-08-2010 03:28 PM

Brilliant mate ...works A1 on 4.0.3 ...look bling too ...rates 5 and hits install

LatinoCheats 08-08-2010 04:20 PM

Friend, I do not want to accept the changes.

After boardcode and save, I get the gray screen, ie, no more anything goes.

Not seem to accepted JAVA SCRIPT.

I installed several BBCodes yours, but sorry, it does not want to install. Can you help?

Thanks

BirdOPrey5 08-08-2010 06:17 PM

Quote:

Originally Posted by LatinoCheats (Post 2080933)
Friend, I do not want to accept the changes.

After boardcode and save, I get the gray screen, ie, no more anything goes.

Not seem to accepted JAVA SCRIPT.

I installed several BBCodes yours, but sorry, it does not want to install. Can you help?

Thanks

I'm doing my best to understand you but I'm not exactly sure what the problem is.

Did you rename and upload the javascript file to your clientscript directory?

Maybe you can tell me exactly when you are having the problem= installing the code, or trying to use it?

sulasno 08-09-2010 12:12 AM

Quote:

Originally Posted by BirdOPrey5 (Post 2080816)
If you're able to upload files (usually via FTP) then you don't need any special permissions to upload javascript (.js) files.

thanks
got it uploaded
not sure whether the ftp client has a bug

LatinoCheats 08-09-2010 01:15 PM

Ok, I explain better. Excuse me, is that I use google translator.

I make all the correct procedures and I "Save BBcode" I do not generate changes.

The screen is gray, then change. That is, it generates no change.

But it seems that is why the code works with "JAVA SCRIPT." I do not understand.

Here a picture of the error:

https://vborg.vbsupport.ru/external/2010/08/52.jpg


Thanks

BirdOPrey5 08-09-2010 03:18 PM

Quote:

Originally Posted by LatinoCheats (Post 2081285)
Ok, I explain better. Excuse me, is that I use google translator.

I make all the correct procedures and I "Save BBcode" I do not generate changes.

The screen is gray, then change. That is, it generates no change.

But it seems that is why the code works with "JAVA SCRIPT." I do not understand.

Here a picture of the error:

http://i35.tinypic.com/281ak38.jpg


Thanks

OK the first issue I see with the picture if that you are in "Styles & Templates." To add a BB Code you need to be in "Custom BB Codes" -> "Add a new BB Code" then follow the instructions in the first post.

"Java Script" is a programming language used on websites to make pages more interactive and do things beyond the basic display of text and graphics.

http://en.wikipedia.org/wiki/JavaScript

In order to make the text fade colors it utilizes "Java Script" - this is a short program that has been written in order to manipulate the text. You need to upload the attached textfade.js.txt file via FTP to your "clientscript" directory and rename it to "textfade.js" (Unfortunately we can't attach .js files in the forum so I had to make it a .txt file).

tyteen4a03 08-10-2010 01:50 PM

Added some bodaudinh's code in to make it support Username colouring and (should) fix the double quotes bug. Thanks to him for the code!

1. Replace fadeText with:
Code:

function fadeText (intext)
{
    var result="";
    intext = intext.substring (0, intext.length);
    colorx = 255;
    z = colorx / intext.length;
    for (var i = 0; i < intext.length; i++)
    {
        colorx = 255 * Math.sin (i / (intext.length / 3));
        colory = con2hex (colorx);
        colorz = z * i;
        colorw = con2hex(colorz);
        k = intext.length;
        j = k - i;
        if(j < 0)
          j = 0;
        coloru = z * j;
        colorv = con2hex(coloru);
        result += ("<font color=\"#" + colorv + colory + colorw + "\">" + intext.substring(i, i + 1) + "</font>")
    }
        return result;
}

2. Add these 2 functions below fadeText function:
Code:

function showRainbow(classname){
    var txtValue = "";
        var b = getElementsByClassName(classname);

    for (var i = 0; i < b.length; i++ ) {
                txtValue = fadeText(b[i].innerHTML,1);
        b[i].innerHTML = txtValue;
    }
}

function getElementsByClassName(classname, node) {

        if(!node) node = document.getElementsByTagName("body")[0];
                var a = [];
                var re = new RegExp('\\b' + classname + '\\b');
                var els = node.getElementsByTagName("*");
                for(var i=0,j=els.length; i<j; i++)
                        if(re.test(els[i].className)) a.push(els[i]);
        return a;
}

3. Replace the BBcode replacement bit to:
Code:

<span class="rainbow">{param}</span>
(which also means you can turn off all Disable options)
3. Add this in anywhere in footer:
Code:

<!-- DOUBLE RAINBOW ALL THE WAY CROSS THE SKY -->
<script type="text/javascript">
<!--
showRainbow('rainbow');
//  End -->
</script>
<!-- WOW WOW OH MY GOD LOOK AT THAT RAINBOW -->


BirdOPrey5 08-10-2010 05:10 PM

Very cool.Thanks for the code- will update the top post.

8thos 10-02-2010 01:47 AM

This BB code doesn't work anymore.


All times are GMT. The time now is 03:38 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.01143 seconds
  • Memory Usage 1,749KB
  • 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
  • (4)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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