vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   remove [img] tag with a quote (https://vborg.vbsupport.ru/showthread.php?t=34880)

floleb7 02-08-2002 10:31 AM

if someone post an image and someone quote this post the [img] tag will be automatically remove and juste the url will stay.

Does someone have this or knows how to do this ?

Admin 02-08-2002 06:09 PM

Not really tested, but give it a try.
In newreply.php, add right after:
Code:

    $pagetext = preg_replace("/(\[quote])(.*)(\[\/quote])/si", "", $pagetext);
this:
Code:

    $pagetext = preg_replace("#(\[img\])(.*)(\[\/img\])#si", "[url]\\2[/url]", $pagetext);

floleb7 02-08-2002 07:57 PM

it works however if it's not a quote from previous message the img tag will be replace by url

Admin 02-09-2002 08:07 AM

Huh? Can you give me an example please?

floleb7 02-09-2002 10:29 AM

example :


in my post i put this : http://www.football365.fr/mediastore...O_SPOREVER.jpg
if someone quote my post he will have

http://www.football365.fr/mediastore...O_SPOREVER.jpg

without [img] quote (with this you don't have the image in other post for nothing)

but if he wants to add an image with [img] it will not replace the [img] tag only for post quote

Admin 02-09-2002 10:33 AM

Sorry but I still don't understand... (help?)

You mean that if the user is adding an image in his own post, it will remain an image and won't be turned into a link?

floleb7 02-09-2002 11:09 AM

i add an image to my post
if someone use quote and not reply my image will become a link.

But wit your modification if someone put an image (another than mine) he will have a link and nothing else


All times are GMT. The time now is 09:15 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.01060 seconds
  • Memory Usage 1,718KB
  • 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_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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