vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How can I stop people from doing this? (https://vborg.vbsupport.ru/showthread.php?t=45019)

telc 10-26-2002 03:44 PM

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?

telc 10-26-2002 04:32 PM

Quote:

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

telc 10-26-2002 04:49 PM

It can be done here in admin/functions.php

PHP Code:

 if($dobbimagecode and ($bbuserinfo[userid]==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


All times are GMT. The time now is 11:05 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.00991 seconds
  • Memory Usage 1,725KB
  • 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_php_printable
  • (1)bbcode_quote_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