vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Multiple Options BBCode (https://vborg.vbsupport.ru/showthread.php?t=254688)

noteviz 12-04-2010 11:34 PM

Multiple Options BBCode
 
Hello,

I've found this for another VB version, but not for vers. 4.x.x.

I would like to mention the following example:

<img src="{param}" width="{option1}" height="{option2}">

[imgsize=100;200]http://.........[/imgsize]


Thanks a lot.

Greets

BirdOPrey5 12-05-2010 03:27 PM

This code was for a BB Code mod here: https://vborg.vbsupport.ru/showthread.php?t=90869

But that doesn't work for VB 4 and it hasn't been updated. By default you can't use multiple options in vBulletin BB Codes, but if you want to control height and width you could make the following:

imgsize

Replacement: <img {option} src="{param}" />

Example: [imgsize="width='100' height='200'"]http://... url ...[/imgsize]

You will get a warning from vBulletin but you can hit continue and it will work.

Warning though- this could be a little dangerous- someone who knew what they were doing could exploit it to run arbitrary HTML.

noteviz 12-05-2010 06:07 PM

It doen't work. You have to write width="100" and this isn't allowed to...

BirdOPrey5 12-05-2010 06:11 PM

you can use single quotes ' instead of " around the numbers, per my example.

--------------- Added [DATE]1291580188[/DATE] at [TIME]1291580188[/TIME] ---------------

I've tested this on 4.0.8 and it works fine.

noteviz 12-05-2010 06:18 PM

Oh sorry, I had forgotten to activate {option}, it's working now, thanks ;)


All times are GMT. The time now is 07:16 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.01136 seconds
  • Memory Usage 1,714KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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