Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Multiple Options BBCode Details »»
Multiple Options BBCode
Version: 2.0, by Master Of Unive Master Of Unive is offline
Developer Last Online: Nov 2019 Show Printable Version Email this Page

Category: BB Code Enhancements - Version: 4.x.x Rating:
Released: 02-12-2018 Last Update: 02-12-2018 Installs: 6
Uses Plugins
 
No support by the author.

Multiple Option BBCode By Andreas

NOTE: I do not own this plugin. I just refactor it a bit to be compatible with PHP 5.5
The original plugin has been archived and there is no vB4 thread so I created one.

That means the plugin works perfectly in vB4. Please see screenshot for example of multiple options for BBCode.

vBulletin gives you two default parameters to create BBCode: {option} and {param}
PHP Code:
<span style="color: {option}">{param}</span>
[
color=option]param[/color

But there is only one 'option', thus limits variety of BBCode. You can still do something like this
PHP Code:
<span {option}>{param}</span
However the above can risk your site, and it does not actually work because BBCode system automatically sanitizes {option} and remove malformed data.


Using this Plugin, you have better way
PHP Code:
<span style="color: {option1}; font-size: {option2}; font-family: {option3}">{param}</span>
[
BBCODE=red|20|Arial]something here[/BBCODE


You can also omit one or more options if you don't need them. But remember there must be one left.
PHP Code:
[BBCODE=red||]Something here[/BBCODE


Changelog:
2.0:
- Switch from deprecated /e to preg_replace_callback
- Change version check url

Download Now

File Type: xml product-multioptionbb.xml (2.1 KB, 53 views)

Screenshots

File Type: jpg Selection_014.jpg (61.7 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
3 благодарности(ей) от:
Alan_SP, sparting, yilmaz

Comments
  #2  
Old 02-13-2018, 01:39 AM
IggyP IggyP is offline
 
Join Date: May 2012
Posts: 252
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wow....really? just when i thought i milked the bbcodes to oblivion

eager to test whenever i can find time...

pretty powerful tool for vb, thank you
Reply With Quote
  #3  
Old 02-13-2018, 01:50 AM
Master Of Unive Master Of Unive is offline
 
Join Date: Oct 2009
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by IggyP View Post
wow....really? just when i thought i milked the bbcodes to oblivion

eager to test whenever i can find time...

pretty powerful tool for vb, thank you
The plugin has been there for a long time, provide a powerful feature for BBCode, but not so many notice. It amazes me so I create a thread for vb4.

It is too late as current vB state though
Reply With Quote
Благодарность от:
IggyP
  #4  
Old 02-13-2018, 02:09 AM
IggyP IggyP is offline
 
Join Date: May 2012
Posts: 252
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

haha yeah that is why it needs every tool it can get ;P.....by then it is superior in some lights at least....for a few more years then oh oh hmm...
Reply With Quote
  #5  
Old 02-13-2018, 03:36 PM
Alan_SP's Avatar
Alan_SP Alan_SP is offline
 
Join Date: Nov 2009
Posts: 1,122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Andreas has really great mods, thanks for adding this thread.

Maybe if you add simple description in first post, I see it on image, but anyway would like to have it explained with text also.

Anyway, great addition. :up:
Reply With Quote
  #6  
Old 02-13-2018, 06:45 PM
IggyP IggyP is offline
 
Join Date: May 2012
Posts: 252
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

tested and verified working....i like it to enrich bbcodes i already made and to combine some others....one thing i am not sure is good tho here....

it gives one option prompt, then the second option needs to be manually edited in? i didnt see a second prompt

it is fine for me, but you know these instagramming generation im not so sure about hmm
Reply With Quote
  #7  
Old 02-13-2018, 10:11 PM
IggyP IggyP is offline
 
Join Date: May 2012
Posts: 252
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

one other limitation i dont like....

if you do not manually edit in the second option it will break the bbcode in the cases i checked....

for example in one case with a highlighter bbcode i wish to let the default text color remain as black, yet give members the option to edit in if they are wanting another...

i tried it basic with a class/css rule to test specificity but noticed not adding that "option2" broke the whole code anyway and wouldnt display at all....so even if the specificity is correct i cant approach it like that....i also tried making a redundant color code with !important applied but also fail...

um if it helps to see the code i mean like this

basic 2 option highlighter bbcode....works unless you do not edit in option 2, which....most people would not do instinctively...
HTML Code:
<span style="background-color: {option1}; color: {option2}">{param}</span>
my failed tries...
HTML Code:
<span style="background-color: {option1}; color: {option2}!important; color:black">{param}</span>
HTML Code:
<span class="highlight" style="background-color: {option1}; color: {option2}">{param}</span>
with the css in the last example being:
HTML Code:
.highlight {
color:black;}
trying to avoid adding confusion of more and more and similar buttons in editor hmm..any ideas or its just the limits built with it perhaps?
Reply With Quote
  #8  
Old 02-14-2018, 09:12 AM
Master Of Unive Master Of Unive is offline
 
Join Date: Oct 2009
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Alan_SP View Post
Andreas has really great mods, thanks for adding this thread.

Maybe if you add simple description in first post, I see it on image, but anyway would like to have it explained with text also.

Anyway, great addition. :up:
I have done some text to clarify the feature, but in developer way

Quote:
Originally Posted by IggyP View Post
tested and verified working....i like it to enrich bbcodes i already made and to combine some others....one thing i am not sure is good tho here....

it gives one option prompt, then the second option needs to be manually edited in? i didnt see a second prompt

it is fine for me, but you know these instagramming generation im not so sure about hmm
The logic of this plugin is just simple. What you want requires much more work. It's really worth to dig in if it was 8 years ago. vB has ended their support for forum add-on. vB4 is EOL also.
Reply With Quote
  #9  
Old 02-14-2018, 09:26 AM
Master Of Unive Master Of Unive is offline
 
Join Date: Oct 2009
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by IggyP View Post
trying to avoid adding confusion of more and more and similar buttons in editor hmm..any ideas or its just the limits built with it perhaps?
I've added description at first post for your case.

If you create a bbcode with 2 options, you have to input 2 options. However you can leave some options blank like this

PHP Code:
[bbcode=option1||option3]text[/option
Otherwise bbcode won't show.

There is better way but it is also more complex.
Reply With Quote
Благодарность от:
IggyP
  #10  
Old 02-14-2018, 03:24 PM
Alan_SP's Avatar
Alan_SP Alan_SP is offline
 
Join Date: Nov 2009
Posts: 1,122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for textual clarification, it is more helpful, especially part that we need to enter all options, even if they remain blank. :up:
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 01:09 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.04637 seconds
  • Memory Usage 2,343KB
  • Queries Executed 24 (?)
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
  • (4)bbcode_html
  • (5)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (5)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (2)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete