PDA

View Full Version : BB Code Enhancements - Rainbow text anywhere (BBcode, usernames, etc, auto-template)


tyteen4a03
09-27-2010, 10:00 PM
NOTE: The original code was by BirdOPrey5 and bodaudinh. Thanks for the inspiriation!

This mod adds rainbow text support. You can use this rainbow text in anywhere on the site as the effect is implemented in JavaScript.

Installation:
1. Upload all files (no need to upload rainbow_source.js)
2. Import the XML
3. Configure BBCode (optional)

Title: Rainbow text
BBCode Tag Name: rainbow
Replacement: <span class="rainbow">{param}</span>
Example: RAINBOW TEXT
Description: Rainbow Text
Use {option}: No
Remove Tag If Empty: Yes
*THE FOLLOWING ARE IMPORTANT! YOU MUST FOLLOW THE SETTINGS BELOW!*
Disable BB Code Within This BB Code: Yes
Disable Smilies Within This BB Code: Yes
Disable Word Wrapping Within This BBCode: Yes
Disable Automatic Link Parsing Within This BB Code: Yes

Usage:
HTML code: <span class="rainbow">TEXT</span>
In theory this works for <font> and other tags that support the class attribute, but none has been tested.

Online Showcase:
http://www.theguildv2.com/forums/misc.php?do=bbcode#rainbow

Changelog:
v1.0.0
-Initial release.
-Fixed a bug where special symbols such as &, ' (single quote) and " (double quote) are not handled correctly.

Support:
Please reply to this thread for any questions.

Thanks for using this mod!

sulasno
09-28-2010, 11:08 AM
too bad that this is not available for vB 4

BirdOPrey5
09-28-2010, 11:59 AM
The author can answer better but I don't see any reason this wouldn't work in 4.0.x (or any vB version for that matter)...

The only possible issue is this line:
<!-- DOUBLE RAINBOW ALL THE WAY CROSS THE SKY -->
<script type="text/javascript" src="$vboptions[bburl]/clientscript/rainbow.js"></script>
<!-- WOW WOW OH MY GOD LOOK AT THAT RAINBOW -->

Which you could replace $vboptions[bburl] with the hard coded url of your site... in fact it may just work as is in vb4, I'm not sure.

tafreeh
09-29-2010, 04:44 PM
screenshot or demo would be goood

Eduardo Leon
09-29-2010, 06:21 PM
yes, please post an screenshot ..

Brandon Sheley
09-29-2010, 06:56 PM
screenshots?

*double rainbow, what does it mean*

tyteen4a03
11-03-2010, 04:15 AM
Screenshot added. Haven't been checking this so yeah :P

I only stick with vB3 so I don't know if this works for vB4 as well.

screenshots?

*double rainbow, what does it mean*
Search for DOUBLE RAINBOW SONG on YouTube, you will know what I mean :P

Eduardo Leon
01-19-2011, 05:26 PM
haha well i search a rainbow with an effect ..

when you put in a nickname or text this change color ...

tyteen4a03
04-10-2012, 04:33 PM
Finally updated the code. No more manual template modification!

ChiNa
05-31-2015, 08:38 AM
Finally updated the code. No more manual template modification!

Its not working. I think its the PHP Code within the XML that is causing it not to work. If found also a Typo in the URL (In XML Product) but i will come to that later. And even after fixing the URL typo It still did not work, and I decided to add the codes manually to see if it works at all.


1) The Code in "headinclude" Template"
<script type="text/javascript" src="clientscript/rainbow.js"></script>2) The Code in my "footer" Template:
showRainbow('rainbow');2) I finally added the BBCODE, and below is a screenshotg of how the Text Turned up in my Test Forums (vB3.8.8):

https://vborg.vbsupport.ru/external/2015/05/2.png


I had no time to investigate the issue further. So I made this short Tutorial to help you out. I hope you could fix it because the mod is very cool. Thanks and Good job btw.

ohh and By the way, About the URL Typo Error I mentioned above. Its in the XML File. The following URL is missing a Slash between: $vboptions[bburl] and clientscript, This is how the URL looks like now:
<script type="text/javascript" src="$vboptions[bburl]clientscript/rainbow.js"></script>

Here is the correct Example:

<script type="text/javascript" src="$vboptions[bburl]/clientscript/rainbow.js"></script>


Good Luck