![]() |
Text Fade (Rainbow Faded Text) BBCode
This BB Code produces a rainbow like text fade effect. It uses Javascript to put multiple html font color tags between characters. There are two ways of doing this, the first method uses an external javascript file. In the second post you add the javascript to every page via the header template instead, this may be better if you expect the rainbow text to be called many times on a single page.
Demo: here. Screen Shot: https://vborg.vbsupport.ru/external/2011/08/71.jpg Before You Start - See tyteen4a03's post (#18) for additional code changes that will allow you to rainbow color usernames and remove a limitation where you couldn't use double-quotes ("). 1. Download the attached textfade.js.txt file, rename it to textfade.js, and upload it to your forums/clientscript folder. 2. Add a new BBCode Title: Text Fade BB Code Tag Name: fade Replacement: Code:
<script type="text/javascript" src="/forums/clientscript/textfade.js"></script> Example: [fade]This code fades text in a rainbow.[/fade] Description: This uses javascript to make a smooth rainbow effect in text. Use Option: No Button Image: (optional) https://vborg.vbsupport.ru/external/2011/08/71.jpg Remove Tag If Empty: Yes All Disable Options: Yes except disable word wrapping: No Limitations:
This BB Code was tested on vb4 but should work on all current versions. Please mark as installed if you use this. :) |
Alternate Method- no external file.
1. In Style Manager -> All Style Options edit the headinclude Template for each style At the bottom add: Code:
<script type="text/javascript"> Title: Text Fade BB Code Tag Name: fade Replacement: Code:
<script>fadeText("{param}");</script> Note- the example won't work in Admin CP because the standard header is not loaded, but it will work in your forum. Description: This uses javascript to make a smooth rainbow effect in text. Use Option: No Button Image: (optional) https://vborg.vbsupport.ru/external/2011/08/71.jpg Remove Tag If Empty: Yes All Disable Options: Yes except disable word wrapping: No All the same limitations as the original method in the top post apply. |
the problem of the Arabic language ?
|
I'm sorry I can't try this on other languages, maybe if you can describe the problem you're having? I have marked this to allow 'translations' so if someone who knows what issues might come up with other languages are free to post versions for those other languages.
From the screen shot it appears to be working? |
If you want the rainbow to fade the other direction (VIBGTOR instead of ROYGBIV) then change the line near the bottom from:
Code:
document.write("<font color=\"#" + colorv + colory + colorw + "\">" + intext.substring(i, i + 1) + "</font>") Code:
document.write("<font color=\"#" + colorw + colory + colorv + "\">" + intext.substring(i, i + 1) + "</font>") |
...is it posible to make fade text in name of usergroups?...
|
Quote:
https://vborg.vbsupport.ru/showthread.php?t=208274 But I've never used it. My guess is if you end up using that mod you could use it to make rainbow bbcode as well... [s]use the same settings as above but don't bother uploading the javascript file here nor putting the javascript in post #2 in the header. Then instead of the replacement text I provided use:[/s] Code:
<span class="rainbow">{param}</span> And yes that mod should work on 4.0 too, no reason it wouldn't. The only 'issue' with that mod is that it isn't a rainbow per say because it doesn't fade from red-to-orange-to-yellow... etc... (ROYGBIV) but I'm sure that won't bother most people. |
Code:
<span class="rainbow">{param}</span> anyways nice bbcode thanks installed also tryed Code:
<span style='font-weight: bold; color: rainbow;'> </span> |
ehh.. sorry. Thanks.
|
do I need special rights to upload the js file to the server ?
|
If you're able to upload files (usually via FTP) then you don't need any special permissions to upload javascript (.js) files.
|
Brilliant mate ...works A1 on 4.0.3 ...look bling too ...rates 5 and hits install
|
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 |
Quote:
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? |
Quote:
got it uploaded not sure whether the ftp client has a bug |
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 |
Quote:
"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). |
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) Code:
function showRainbow(classname){ Code:
<span class="rainbow">{param}</span> 3. Add this in anywhere in footer: Code:
<!-- DOUBLE RAINBOW ALL THE WAY CROSS THE SKY --> |
Very cool.Thanks for the code- will update the top post.
|
This BB code doesn't work anymore.
|
Quote:
|
Quote:
|
Quote:
Quote:
*checks again* Wow look at that! It's working again! But now instead of bringing me back to my post, it brings me to a white page with just the text. WTF... |
I really doubt the issue is being caused by this bb code but if you can give me a link to a thread on your forum I'll take a look and see if I can figure it out.
I have it running on a 4.0.6 test board myself and it's working fine. |
K thanks man.
|
Whenever I install this and make a post with the bbcode.. it sends me to a white page with just the text. So I'm going to have to remove this till this gets fixed.
|
I've seen this happen in 1 other forum, there is another mod interfering with it- unfortunately I was never able to track down which one. Someone else has released a combined rainbow bb code and rainbow text usernames, you might want to try that and see if you get better results.
|
Working and Installed
4.1 PL2 |
thank you you sir nice one , installed on 4.1.1 yeah the update you helped me do . have a great day
|
4.1.4
I love this so much I want to just set it as the default text for everything in my life The problem is it doesn't play nice with other codes, size and bold italics etc etc and even asterisks If you play with the ordering of the tags it you can get it to work somewhat but not fully Here's an example of me using WYSIWYG to have the text size 7, bold, italic and underlined, when I clicked post I got this: https://vborg.vbsupport.ru/external/2011/05/1.png Is it just me? Is it 4.1.4's new horrible editor? |
The [FADE] BB Code should always be the INNER most code:
[FADE]Example[/FADE] If this doesn't work on 4.1.4's new editor there's not much else to do. I don't have 4.1.4 and doubt I ever will so I can't test it. If someone else with 4.1.4 wants to improve upon the code they are welcome to re-release an updated version. |
Quote:
|
Sure, how do you want me to do that?
|
Quote:
|
Would really love to see this working for 4.1.4
|
All times are GMT. The time now is 06:45 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|