vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Kill Attachments in Signatures (https://vborg.vbsupport.ru/showthread.php?t=67806)

Sean335 07-29-2004 10:00 PM

Kill Attachments in Signatures
 
Replaces signature images using your board's attachements with a message telling them to stop.

open includes/functions_showthread.php
find: (on lines 517 and 518)
PHP Code:

$post['signature'] = parse_bbcode($post['signature'], 'nonforum'$vboptions['allowsmilies']);
$sigcache["$post[userid]"] = $post['signature']; 

and add above it:
PHP Code:

$post['signature'] = preg_replace("/\[img\](.*?)\/attachment.php(.*?)\[\/img\]/i""[i]attached pictures not allowed in signatures.[/i]"$post['signature']); 

Using this method will block any img tag that uses attachment.php, if you want to block just ones that use your site, use something like:
PHP Code:

$post['signature'] = preg_replace("/\[img\](.*?)www.3.8mustang.com\/forum\/attachment.php(.*?)\[\/img\]/i""[i]attached pictures not allowed in signatures.[/i]"$post['signature']); 


MindTrix 07-31-2004 12:04 AM

Nifty little add on mate thank you. I think some people would request too see a screenshot of this in action also.

Sean335 07-31-2004 12:46 AM

Quote:

Originally Posted by MindTrix
Nifty little add on mate thank you. I think some people would request too see a screenshot of this in action also.

Thanks. There's not much to see, but I posted a screen shot.

Koutaru 07-31-2004 02:13 AM

Thanks :) if I have any problems with users, I'll definately install this :)

Zachery 07-31-2004 02:23 AM

Quote:

Originally Posted by Koutaru
Thanks :) if I have any problems with users, I'll definately install this :)

There is also the option of just not allowing dynamic images.

MindTrix 07-31-2004 05:12 AM

Quote:

Originally Posted by Zachery
There is also the option of just not allowing dynamic images.

some hacks require this to be turnt on though, such as the signature upload hack. This hack is a nice idea so lets keep on topic :rolleyes:

Martyjp 08-08-2004 08:33 AM

Thanks, needed this :)

Quelyn 08-18-2004 06:19 PM

Clicked install. Thanks, this is a nice simple one.

vau7 08-19-2004 03:12 PM

Whats so bad if an user would take an attachment in the sig?

Sean335 08-20-2004 12:51 AM

Quote:

Originally Posted by vau7
Whats so bad if an user would take an attachment in the sig?

bandwidth, database load, messes with the counters. My site just isn't a sig host, and too many people started using attachments, so I wrote that line.


All times are GMT. The time now is 03:32 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.01005 seconds
  • Memory Usage 1,737KB
  • 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
  • (3)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete