PDA

View Full Version : remove [img] tag when quoting a post.


jamie
11-11-2001, 10:34 AM
title says it all relly;)

Admin
11-11-2001, 12:12 PM
In newreply.php, add this:
$pagetext = preg_replace("/(\[quote])(.*)(\[\/quote])/siU", "", $pagetext);
right after this:
$pagetext = preg_replace("/(\[img])(.*)(\[\/img])/siU", "", $pagetext);
I hope this works, I suck with regexes so I just copied it.

Let me know. :)

jamie
11-11-2001, 02:53 PM
works like a treat:D

huge thanks. :)

Gutspiller
01-25-2002, 05:21 AM
I don't have this line



$pagetext = preg_replace("/(\[img])(.*)(\[\/img])/siU", "", $pagetext);



in my newreply.php

My version of VB is 2.0.3 Can you give me another line to look for?

Thanks in advance. :up:

Reeve of shinra
01-25-2002, 03:10 PM
Using 2.0.3 as well and I would like to use this as well.

Reeve of shinra
01-26-2002, 12:18 AM
I guess Palmer already did this .... cause its already in our board. lol

anway ,... do a search for $pagetext

You should see something like this:

$pagetext=htmlspecialchars($postinfo[pagetext]);


Replace whats under that so it looks like this:


// strip IMG tags from quotes
$pagetext = preg_replace("/(\[img])(.*)(\[\/img])/siU", "", $pagetext);
$pagetext = preg_replace("/(\[quote])(.*)(\[\/quote])/siU", "", $pagetext);
eval("\$message = \"".gettemplate("quotereply",1,0)."\";");
}
}



now to make this strip out glow!

Gutspiller
01-28-2002, 03:56 PM
All I have is this:


Originally posted by $originalposter
$pagetext