Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
New BB tag to do rainbow text... Details »»
New BB tag to do rainbow text...
Version: 1.00, by Zzed Zzed is offline
Developer Last Online: Feb 2012 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 01-07-2003 Last Update: Never Installs: 19
 
No support by the author.

This is a fairly simple hack that allows you to create a new BB tag to do
rainbow colors with text. It is only a few lines and the only file affected
by it is admin/functions.php.

You can see a sample output in this thread: http://www.ls1.com/forums/showthread...hreadid=225576


Note1: This hack has been done and tested on VB 2.2.9
Note2: Using other BB tags within the rainbow tags will convert the underlying HTML code in to rainbow text.

Note3: You can find the revised and BB code friendly version in this post

Note4: You can find the version that displays the full spectrum of colors in this post.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 01-09-2003, 04:49 PM
nymyth nymyth is offline
 
Join Date: Jun 2002
Location: New York
Posts: 367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well the code works....when i put in [ rainbow]text here[ /rainbow]

my question is do i have to do this manually each time....????or is there a drop down menu im missing??

Peace
Reply With Quote
  #23  
Old 01-09-2003, 04:52 PM
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Oct 2001
Location: inside vB3's .php
Posts: 1,245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oh god....

*winces*

What a lovely idea.. make the sourcecode of already huge threads even twice as big! :up:

Use five hundred font tags in a page! :up:

Double your bandwidth usages if people use your lovely (</sc>) hack! :up::up:

ugh...
(sorry, just felt like pointing that out ^_^)
Reply With Quote
  #24  
Old 01-09-2003, 08:10 PM
Areku Areku is offline
 
Join Date: Feb 2002
Posts: 540
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by DrkFusion
Hehe cool little hack

Drkfusionwillinstallthis
Can you, DarkFusion, or anyone, explain me how to get the rainbow to act like HERE and not like the original hack? the original hack is lack of green and blueish colors of the rainbow...

Tu!
Reply With Quote
  #25  
Old 01-09-2003, 08:17 PM
Zzed's Avatar
Zzed Zzed is offline
 
Join Date: Feb 2002
Location: Glendale, CA, USA
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, here is the BB code friendly version.

Note: If you have installed the original version, you need to back out of it and replace it with this one.
Reply With Quote
  #26  
Old 01-09-2003, 08:46 PM
John's Avatar
John John is offline
 
Join Date: Mar 2002
Location: Norwich, UK
Posts: 1,543
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I made a couple of changes to this - I didn't much like the black background, so I went for the dark glow option. (See attached screenshot)
Reply With Quote
  #27  
Old 01-09-2003, 08:48 PM
John's Avatar
John John is offline
 
Join Date: Mar 2002
Location: Norwich, UK
Posts: 1,543
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To use glow like I did, simply modify the code from the hack in the first post:

Find (in functions.php):

Code:
// ###################### Startdorainbow #######################
function dorainbow($code) {
  $len = strlen($code);
  $buffer = "<table><tr><td bgcolor=\"#000000\">";
  $mul = 255/$len;
  for($x = 0;$x < $len;$x++) {
    $color_h1 = 255*sin($x/($len/3));
    $color_h2 = $mul * $x;
    $color = sprintf("#FF%02X%02X", $color_h1, $color_h2);
    $buffer .= "<font color=\"$color\">";
    $buffer .= substr($code,$x,1);
    $buffer .= "</font>";
  }
    $buffer .= "</td></tr></table>";

  return($buffer);
}
And replace with:

Code:
// ###################### Startdorainbow #######################
function dorainbow($code) {
  $len = strlen($code);
  $buffer = "<table style=\"filter:glow(color=black, strength=2)\"><tr><td>";
  $mul = 255/$len;
  for($x = 0;$x < $len;$x++) {
    $color_h1 = 255*sin($x/($len/3));
    $color_h2 = $mul * $x;
    $color = sprintf("#FF%02X%02X", $color_h1, $color_h2);
    $buffer .= "<font color=\"$color\" face=\"Verdana\" size=2><b>";
    $buffer .= substr($code,$x,1);
    $buffer .= "</b></font>";
  }
    $buffer .= "</td></tr></table>";

  return($buffer);
}
Reply With Quote
  #28  
Old 01-09-2003, 08:51 PM
Areku Areku is offline
 
Join Date: Feb 2002
Posts: 540
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

FAR FAR Much nicer now with the glow effect!

However how do i add the FULL range of colors and not just the red/yellow/pink ones?

Blue and green are missing from the spectrum!!
Reply With Quote
  #29  
Old 01-09-2003, 08:53 PM
John's Avatar
John John is offline
 
Join Date: Mar 2002
Location: Norwich, UK
Posts: 1,543
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Areku
FAR FAR Much nicer now with the glow effect!

However how do i add the FULL range of colors and not just the red/yellow/pink ones?

Blue and green are missing from the spectrum!!
No idea!

This code is pretty clever stuff, I can't figure it out!
Reply With Quote
  #30  
Old 01-09-2003, 08:55 PM
Areku Areku is offline
 
Join Date: Feb 2002
Posts: 540
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What a weirdo!

Full range of colors is active here!!

[rainbow]supercalifragilisticumspialidociousisthewordiuseto testthisrainbowthing[/rainbow]
Reply With Quote
  #31  
Old 01-09-2003, 08:56 PM
Areku Areku is offline
 
Join Date: Feb 2002
Posts: 540
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh!

It didn't work!!

DarkFusion, what did u use!? Manually entered that sentence colorfull?
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:28 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05375 seconds
  • Memory Usage 2,306KB
  • Queries Executed 27 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete