Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

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
  #62  
Old 02-07-2003, 06:28 AM
Robink Robink is offline
 
Join Date: Feb 2003
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I always get the error "Division by zero"
Reply With Quote
  #63  
Old 02-07-2003, 06:29 AM
Robink Robink is offline
 
Join Date: Feb 2003
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In particular it sayd this:

Warning: Division by zero in /home/virtual/site13/fst/var/www/html/forums/admin/functions.php on line 844


I tried both versions of the hack
Reply With Quote
  #64  
Old 04-06-2003, 11:31 PM
Classy Classy is offline
 
Join Date: Apr 2003
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice addition Installed and works on 2.3.0
Clicked install Thank you
Reply With Quote
  #65  
Old 04-07-2003, 06:34 AM
Zzed's Avatar
Zzed Zzed is offline
 
Join Date: Feb 2002
Location: Glendale, CA, USA
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
02-07-03 at 01:29 AM Robink said this in Post #62
In particular it sayd this:

Warning: Division by zero in /home/virtual/site13/fst/var/www/html/forums/admin/functions.php on line 844


I tried both versions of the hack
Please Email me a copy of your functions.php.

My Email is: edwink@seebeyond.com
Reply With Quote
  #66  
Old 04-30-2003, 02:52 AM
MooMan65's Avatar
MooMan65 MooMan65 is offline
 
Join Date: Mar 2002
Location: New Zealand
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I get a division by zero error every time someone types in [rainbow][/rainbow] without anything in it. The error only appears on the page at which it's typed but doesn't go away, it just accumulates over time. Otherwise the hack works perfectly, but it's that error which is stopping me from installing it, as not all members are kind enough to NOT type it in. And way to stop this?
Reply With Quote
  #67  
Old 04-30-2003, 04:31 AM
Zzed's Avatar
Zzed Zzed is offline
 
Join Date: Feb 2002
Location: Glendale, CA, USA
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I will correct the bug and post a fix. I'll do that later tonight.
Reply With Quote
  #68  
Old 04-30-2003, 08:48 AM
Zzed's Avatar
Zzed Zzed is offline
 
Join Date: Feb 2002
Location: Glendale, CA, USA
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have fixed all the attached versions for the "division by zero" error.
Reply With Quote
  #69  
Old 04-30-2003, 08:53 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 04:48 AM Zzed said this in Post #67
I have fixed all the attached versions for the "division by zero" error.
I'm still using version 1 with the code in the functions.php. What would be the fix for that?
Reply With Quote
  #70  
Old 04-30-2003, 09:16 AM
Zzed's Avatar
Zzed Zzed is offline
 
Join Date: Feb 2002
Location: Glendale, CA, USA
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I fixed all 3 versions.

In function dorainbow()
Look for:
Code:
$len = strlen($code);
Add this directly below it:
Code:
  if($len == 0) {
    return($code);
  }
Reply With Quote
  #71  
Old 09-08-2003, 11:46 PM
lioncool1589 lioncool1589 is offline
 
Join Date: Feb 2003
Posts: 76
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

would be nice if user can change diff color
Reply With Quote
Reply


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:05 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.04410 seconds
  • Memory Usage 2,308KB
  • Queries Executed 25 (?)
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
  • (3)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_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