View Full Version : How can I stop people from doing this?
Im my forums, when users attach images, they show up as a link in the post. I did this to conserve bandwith and it also brought my server load down, becuase lots of my users threads had images in them. And thats alot of extra CPU when you have hundreds of users opening threads with 10 images in them, and they are all getting pulled from the database.
But users get around this by attaching an image, then going back and editing the post and using the [img] tags. I don't want to stop [img] tags completely, because I dont care if they link to pictures on their own server and have the image display in the thread.
concept
10-26-2002, 04:27 PM
so your saying you want to just stop them from [img] to your server?
Originally posted by concept
so your saying you want to just stop them from [img] to your server?
yes, so if they they do use a [img] to my server it will either show another image, saying "Do not link" or it will just show an href to the image.
concept
10-26-2002, 04:35 PM
hmmm this woudl sure be a task.. thats like hyperlink blocking.. "something geocities does now" but the link is still at your site so i'm think it will not work becuase it pointing to your server from you server so i don;t think there is an internal way of blocking this.. my only suggestion for now is make sure your mods are doing there job .. tell them to edit posts ext
It can be done here in admin/functions.php
if($dobbimagecode and ($bbuserinfo[userid]==0 or $bbuserinfo[showimages])) {
// do [ img]xxx[ /img]
$bbcode = preg_replace("/(\[)(img)(])(\r\n)*([^\"".iif($allowdynimg,"","\?\&")."]*)(\[\/img\])/siU","<img src=\"\\5\" border=\"0\" alt=\"\">", $bbcode);
}
$bbcode = preg_replace("/(\[)(img)(])(\r\n)*([^\"]*)(\[\/img\])/siU", "<a href=\"\\5\" target=\"_blank\">\\5</a>", $bbcode);
I just need to figure out how I can see if the Link contains my $HTTP_HOST, if it does, then it will just get an HREF, if not, it will get an IMG tag
concept
10-26-2002, 05:03 PM
hm your right
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.