vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   BBCode Image (https://vborg.vbsupport.ru/showthread.php?t=255558)

patt1293 12-20-2010 03:47 AM

BBCode Image
 
Basically what i want to do is have a bbcode setup and have an image set in the editor.

When a user clicks on it...

it will insert
[image] in the post editer box...

then in the final post it will have the physical image displayed that is assigned to that bbcode.

Any suggestions?

kh99 12-20-2010 04:17 AM

I'm not sure I follow - is [image] just an example (that is, would the tag always be [image], or would it be some other word)?

It kind of sounds like you're describing smilies.

patt1293 12-20-2010 04:37 AM

that is an example.. [info] would display an image that had information on the image. etc etc.

kh99 12-20-2010 04:42 AM

OK. Could you just define a custom bbcode and make the replacement value be the html for the image? The code inserted would be like [info][/info] but otherwise I think it would do what you're describing.

patt1293 12-20-2010 04:47 AM

i have had that setup before just fine

but people would want to put something in the middle and it would break.

i was wondering if i could eliminate the second half of the bbcode

patt1293 12-21-2010 09:13 PM

anyone?

kh99 12-21-2010 11:28 PM

I wasn't going to respond again because I don't have a good answer, but since you started the second thread...

If you define your bbcode replacement as <img src="something" />{param} then if someone puts something in the middle it should just put the image first (but maybe you already tried that).

If you really wanted single tags you would have to modify the javascript to get a button to insert a single tag, then you would also have to add a plugin to process the tag.

Or you could somehow use the smilies since I think they do exactly what you want (except I don't know what would happen to the smilies menus if you used large images).

BirdOPrey5 12-23-2010 01:25 AM

Quote:

Originally Posted by patt1293 (Post 2136698)
i have had that setup before just fine

but people would want to put something in the middle and it would break.

i was wondering if i could eliminate the second half of the bbcode

If you don't put {param} in the BB Code replacement then whatever is put between the tags ([info]test[/info]) will just be ignored- it shouldn't break anything.


All times are GMT. The time now is 03:13 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.01055 seconds
  • Memory Usage 1,719KB
  • 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)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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