Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 05 Jun 2015, 09:21
jkotlowski jkotlowski is offline
 
Join Date: May 2015
Image BB Code Request

I've been searching google for the better part of an hour trying to figure this out, but I can't get it to work.

I want my members to have the ability to manually resize images with bbcode, I was on another site that did the same thing. The bbcode was [img=pixel widthxpixel height]image url[/img]

I've been throwing code into the bbcode manager and using an {option} tag for both width and height, but in the example when I do my img=250x51 tag it just treats the height and width as being 200 each. I can't figure out how to get it correct.
Reply With Quote
  #2  
Old 06 Jun 2015, 11:50
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Real name: Sven
You can't do that with a custom bbcode alone. You need to have underlying php code that splits width and height and sets the html tag accordingly.

You probably could do it using this:
http://www.vbulletin.org/forum/showthread.php?t=264896
__________________
Please note that there will be no further updates to my addons, especially they will not be upgraded for vB5. I'm leaving vB, since IB choose to go the banana-way yet again.

http://www.roma-antiqua.de
Reply With Quote
  #3  
Old 06 Jun 2015, 15:02
Master Of Unive's Avatar
Master Of Unive Master Of Unive is offline
 
Join Date: Oct 2009
This mod can easily handle your problem

https://www.vbulletin.org/forum/show...=189508&page=2
Reply With Quote
  #4  
Old 07 Jun 2015, 05:50
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Real name: Sven
I just saw this is a vB5 request. Both addons will (likely, can't test) not work with vB5, since they rely on the plugin system, which was removed from vB5.
__________________
Please note that there will be no further updates to my addons, especially they will not be upgraded for vB5. I'm leaving vB, since IB choose to go the banana-way yet again.

http://www.roma-antiqua.de
Reply With Quote
  #5  
Old 07 Jun 2015, 12:45
jkotlowski jkotlowski is offline
 
Join Date: May 2015
Thank you for the replies. I'm actually on VB Cloud, so I'm unable to do any kind of mods anyway. (I don't think I placed this in the VB5 requests, could have swore it was elsewhere) I was really just hoping this could be handled with BB Code alone. But if it cannot, thank you regardless for your responses.
Reply With Quote
  #6  
Old 09 Jun 2015, 14:13
Black Snow Black Snow is offline
 
Join Date: Jul 2012
You can do it with BBCode if you are not bothered about the image height or width being adjusted accordingly.

Enter this as your replacement:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Then further down, select yes on: Use {option}

Then when you use your BBCode, enter something like:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This will then keep your image 100px wide, and auto adjust the height to match.
Reply With Quote
  #7  
Old 10 Jun 2015, 06:28
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Real name: Sven
Good idea! But this will lead to rather small landscape images, when height is smaller than width, and comparable big portrait images, when height is bigger than width.

With vB5 Cloud, is there any way to inject your own css code? Then you could use option to call predefined css classes.

--------------- Added 10 Jun 2015 at 06:42 ---------------

Forget my last question, it won't help. To get around the issue I just mentioned, you'll always need some logic to check which side is bigger.
__________________
Please note that there will be no further updates to my addons, especially they will not be upgraded for vB5. I'm leaving vB, since IB choose to go the banana-way yet again.

http://www.roma-antiqua.de
Reply With Quote
  #8  
Old 10 Jun 2015, 07:48
Black Snow Black Snow is offline
 
Join Date: Jul 2012
Found this: https://www.vbulletin.org/forum/showthread.php?t=287476

Looks similar to what I posted.
Reply With Quote
  #9  
Old 14 Jun 2015, 18:37
PinkMilk PinkMilk is offline
 
Join Date: May 2010
Real name: Milk Pink
Replacement:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

JSFiddle height:auto demo; height:auto will allow you keep aspect ratio needing only width to be adjusted.

If adjusting both width and height is really necessary try this mod:
Multiple Options in Custom BBCode

with this replacement:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Members would then simply add highlighted text in option popup:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Update:
Just noticed this request is for vb5 and mod mentioned above is for vb3, will leave post however for vb3 users that might be interested.

Last edited by PinkMilk; 14 Jun 2015 at 18:52.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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


New To Site? Need Help?

All times are GMT. The time now is 03:40.

Layout Options | Width: Wide Color: