vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   how to insert image before [img] bb code (https://vborg.vbsupport.ru/showthread.php?t=229855)

columbusgeek 12-09-2009 04:53 PM

how to insert image before [img] bb code
 
I have a need to insert a image before images inserted via bbcode. It will sort of serve as a header before the images are viewed.

For example it could be a image, that says this image is resized. (that is not exactly my plan, but a good example)

How or where can I insert this call to pull the image in, only when a [img] bb code is used?

Lynne 12-09-2009 05:53 PM

Have you tried looking at the class_bbcode.php file and at the function for the image bbcode?

columbusgeek 12-09-2009 06:18 PM

Good suggestion.

That is abit out of my reach, but I am willing to try for it.

do I append my image to this area? I tried a few things but failed.

Code:

        // do [img]xxx[/img]
                                $bbcode = preg_replace('#\[img\]\s*(https?://([^*\r\n]+|[a-z0-9/\\._\- !]+))\[/img\]#iUe', "\$this->handle_bbcode_img_match('\\1')", $bbcode);


Lynne 12-09-2009 07:42 PM

I don't know exactly where to do it since I really don't understand exactly what you are trying to do. I'm just suggesting that that may be the function you want to try to modify to do what you want.

columbusgeek 12-09-2009 08:17 PM

1 Attachment(s)
maybe a graphic will help convey my thoughts better.

Lynne 12-09-2009 09:07 PM

OK, well you can try to add it around where that code it. After they do the preg_replace, I suppose you can just append your code to the front of it.


All times are GMT. The time now is 06:51 PM.

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.00986 seconds
  • Memory Usage 1,715KB
  • 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_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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