vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 5.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=259)
-   -   BB Code Enhancements - Rainbow BBCode (https://vborg.vbsupport.ru/showthread.php?t=324211)

Yuseki 01-15-2017 10:00 PM

Rainbow BBCode
 
1 Attachment(s)
Title:
Code:

Rainbow Text
BB Code Tag Name
Code:

rainbow
Replacement:
Code:

<span class="rainbow">{param}</span>
Example:
Code:

[rainbow]text[/rainbow]
Description:
Code:

Makes your text display in a rainbow gradient.
Options
Use {option}: No
Button Image:
Remove Tag if Empty: Yes
Disable BB Code Within This BB Code: Yes
Disable Smilies Within This BB Code: Yes
Disable Word Wrapping Within This BB Code: No
Disable Automatic Link Parsing Within This BB Code: Yes


Add this to your Custom CSS[SiteBuilder>Style>CSS
Or AdminCP>Styles>Style Manager>{style}>Edit Templates>CSS Templates>css_additional.css:
Code:

.rainbow {
    background-image: -webkit-gradient( linear, left top, right top, color-stop(0, #f22), color-stop(0.15, #f2f), color-stop(0.3, #22f), color-stop(0.45, #2ff), color-stop(0.6, #2f2),color-stop(0.75, #2f2), color-stop(0.9, #ff2), color-stop(1, #f22) );
    background-image: gradient( linear, left top, right top, color-stop(0, #f22), color-stop(0.15, #f2f), color-stop(0.3, #22f), color-stop(0.45, #2ff), color-stop(0.6, #2f2),color-stop(0.75, #2f2), color-stop(0.9, #ff2), color-stop(1, #f22) );
    color:transparent;
    -webkit-background-clip: text;
    background-clip: text;
}

Thanks to [name]noypiscripter[/name] for suggestion on custom css/span class

Mark.B 01-17-2017 05:39 PM

Would be better to stick the css in the css_additional.css template, so you don't have style tags getting inserted wherever the code is used.

Yuseki 01-17-2017 07:00 PM

That would be better, but I do not have access to server files, only admincp.

Thanks for the advice.

Dragonsys 01-17-2017 07:25 PM

Quote:

Originally Posted by Yuseki (Post 2580987)
That would be better, but I do not have access to server files, only admincp.

Thanks for the advice.

editing the addtional.css is performed via AdminCP. It is under the Style Editor

noypiscripter 01-18-2017 12:01 AM

Or via Sitebuilder > Style > CSS Editor

Yuseki 01-18-2017 08:36 PM

ohhhh durr.. had a blond moment

noypiscripter 01-18-2017 10:11 PM

I suggest you use this replacement in the custom BBCode. Do not use custom tag <rainbow> as IE (especially older versions) may or may not like it.

Code:

<span class="rainbow">{param}</span>
Then add the below custom CSS in css_additional template in AdminCP or via Sitebuilder > Style > CSS Editor:

Code:

.rainbow {
    background-image: -webkit-gradient( linear, left top, right top, color-stop(0, #f22), color-stop(0.15, #f2f), color-stop(0.3, #22f), color-stop(0.45, #2ff), color-stop(0.6, #2f2),color-stop(0.75, #2f2), color-stop(0.9, #ff2), color-stop(1, #f22) );
    background-image: gradient( linear, left top, right top, color-stop(0, #f22), color-stop(0.15, #f2f), color-stop(0.3, #22f), color-stop(0.45, #2ff), color-stop(0.6, #2f2),color-stop(0.75, #2f2), color-stop(0.9, #ff2), color-stop(1, #f22) );
    color:transparent;
    -webkit-background-clip: text;
    background-clip: text;
}


Yuseki 01-18-2017 10:49 PM

Thanks. I'll add that.

mbgelsin 02-18-2017 05:34 PM

I am unable to edit the css_additional.css for a theme because it is inherited by the default theme, yet the bbcode won't work. Any thoughts?

resolved: I had to open the style editor > css before I was able to make changes.

Yuseki 02-18-2017 08:02 PM

Glad you got it to work. Enjoy the gorgeous rainbows.

aburisha 11-25-2019 06:30 PM

Excellent work! It adds colors to my forums posts!


All times are GMT. The time now is 07:21 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.01289 seconds
  • Memory Usage 1,731KB
  • 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
  • (8)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (11)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete