vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   404 error ban. (https://vborg.vbsupport.ru/showthread.php?t=48710)

Brad 02-07-2003 10:00 PM

404 error ban.
 
Hack: 404 error ban

By: Anime-loo

This hack provides you with a new way of banning people from your forum, i wrote this for a client awhile back and never released it, well i saw the blank page ban released so I decided to release mine ;).

This basicly dose what the thread title says, if a user is in the 404 banned usergourp they will get a "HTTP 404 - File not found" on any page powered by vBulletin.

Simple i know, but its been useful for me. :)

Download: Here

Version 2

Version two is now out, remove the the loo_404 template and do the new code edit for global.php to upgrade. do not run the query in the install file if you already have version 1 installed!!

Velocd 02-08-2003 09:39 PM

Heh, I've been doing this for the last 4 months on my vBulletin, but I failed at emulating the 404-error page in HTML, so instead I simply copy+pasted an image of the 404-error page into Adobe, saved it as a really light-weight GIF, then edited the ban-template in the ACP and set the image using CSS as a background of the page, but so it does not repeat. It works well, but if the user simply tried to highlight any of the 404-error text, they would find out it would not be possible.. though, that doesn't mean they'd figure out what I had done to ban them ;)

Anyway, your method wins over mine, so I guess it's time for upgrade :p

[high]* Velocd clicks install[/high]

N9ne 02-08-2003 09:40 PM

My hack lets people use whatever :p

nice hack though, but I prefer mysql errors :p

Velocd 02-08-2003 09:42 PM

You forgot to include the images in the 404 also Anime-loo ;)
And I'm fairly sure this 404 is just the internet-explorer version, so let's hope Netscape/Mozilla users don't catch on ^_^

Brad 02-08-2003 09:44 PM

Yea, im very lazy. ill zip the images up sometime tonight.

Slynderdale 02-08-2003 09:45 PM

hmm would this also work?
PHP Code:

if ($bbuserinfo['usergroupid']==333) {
           @
header("HTTP/1.0 404 Not Found");
           @
header("Status: 404 Not Found");
    } 

I use index.php to hide important folders by adding this to them
PHP Code:

<?php
  
@header("HTTP/1.0 404 Not Found");
  @
header("Status: 404 Not Found");
?>

and was wondering if this would also work.

N9ne 02-08-2003 09:45 PM

What you could do is create a custom 404 page for your server, and then just call it somehow (I think it is possible somehow). That way it's the same in all browser windows :).

N9ne 02-08-2003 09:49 PM

Quote:

Originally posted by Slynderdale
hmm would this also work?
PHP Code:

if ($bbuserinfo['usergroupid']==333) {
           @
header("HTTP/1.0 404 Not Found");
           @
header("Status: 404 Not Found");
    } 

I use index.php to hide important folders by adding this to them
PHP Code:

<?php
  
@header("HTTP/1.0 404 Not Found");
  @
header("Status: 404 Not Found");
?>

and was wondering if this would also work.


What does the @header mean/do ?

Slynderdale 02-08-2003 09:51 PM

Quote:

Originally posted by N9ne



What does the @header mean/do ?

It sends the user's browser info, like the page status and so on, it can also be used to tell when to update the page in the cace, if it should cache the page and the filetype and so on, with the example I gave above, it tells your browser that this page is 404 (missing) and then the browser shows a 404 file mssing page.

More info here:
http://php.net/header

Martin64 02-08-2003 10:02 PM

Smart and simple, I like it. :)
Great idea :D


All times are GMT. The time now is 02:45 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.01097 seconds
  • Memory Usage 1,743KB
  • 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
  • (4)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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