vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Removal of IMG tag upon quoting (https://vborg.vbsupport.ru/showthread.php?t=67211)

68 Z-28 07-15-2004 05:19 PM

Removal of IMG tag upon quoting
 
I think i've seen this on some vb 2.x.x boards, but forget. Anywho, what I'd like is that when someone quotes a post that has images, it removes the IMG tags and just puts up a link instead. This way if people quote a post 5 times you won't have to keep scrolling through the image, it'll just be a link in the quote.

Xenon 07-15-2004 05:49 PM

try that one:

open newreply.php

find:

PHP Code:

        eval('$newpost[\'message\'] = "' fetch_template('newpost_quote'10) . '";'); 

and BEFORE add:
PHP Code:

$newpost['message'] = preg_replace('/(\[img])(.*)(\[\/img])/siU''[url]\1[/url]'$newpost['message']); 

i think that should work :)

68 Z-28 07-16-2004 02:44 AM

OK, just tested again... It removes the IMG completely if I'm quoting a quote. I'd like this to change the IMG to a URL from the original post.

Edit: I brainfarted for a second... of course the IMG will be removed from the second quote..... so in short that code didn't work...

Thank you for helping me with this.

Xenon 07-16-2004 12:51 PM

well, removing nested quotes is vb's standard behaviour.

you have to remove the strip_quotes part to allow that.

68 Z-28 07-16-2004 05:18 PM

YEah, I wsa kinda confusing myself yesterday so my apologies for confusing you as well. The code that you provided didn't work.... Instead of replacing the code how would I get it to just drop the IMG tags and keep the link? I realize that the board is set to autoparse URL's so, I think it will do this by default if there is no IMG tag around it.

68 Z-28 07-19-2004 10:26 PM

Any other suggestions?

68 Z-28 07-29-2004 02:00 AM

Any other ideas?


All times are GMT. The time now is 03: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.01094 seconds
  • Memory Usage 1,721KB
  • 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_php_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