vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Custom BCCODE Image Resize (https://vborg.vbsupport.ru/showthread.php?t=293303)

richardevans123 12-26-2012 05:53 PM

Custom BCCODE Image Resize
 
Hi All,

I'm trying to add my own Custom BBCODE so that I can make my website more Retina Display Friendly. I've done a lot of editing of the style already, but my signatures don't have the retina graphics. What I'd like to have is something like;

HTML Code:

"[imgr 686x126]enter your url here[/imgr]"
Currently, I've got it set up, but it doesn't actually show the image. The HTML replacement is as following:
HTML Code:

<img src="{URL}" height="{NUMBER1}px" width="{NUMBER2}px" alt="{L_IMAGE}" title="{L_IMAGE}" />
Any ideas?

Thanks

kh99 12-26-2012 06:01 PM

How did you come up with that replacement html? As far as I know, the only variables you can use in the replacement are {param} and {option}.

richardevans123 12-26-2012 06:07 PM

I just did some research in HTML, and found that

kh99 12-26-2012 06:48 PM

OK, well, I wanted to make sure you weren't using a mod or something. But I guess while other software might inplement bbcode differently, in vbulletin you can only use option and parameter (the part inside the opening tag and the part between the tags), so I don't think there's any way to do what you're trying to do without some php code. (While you *can* do something like <img style="{option}" to allow any CSS to be entered, that's not a good idea because a user could include CSS that could mess up the page layout).

richardevans123 12-26-2012 07:04 PM

Okay. No worries, thank you anyway


All times are GMT. The time now is 03:17 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.01563 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
  • (2)bbcode_html_printable
  • (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