vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   [beta release] Forum Passwords (https://vborg.vbsupport.ru/showthread.php?t=12610)

JamesUS 03-29-2001 06:27 PM

Okay I've seen a lot of demand for this so decided to give it a shot. It is still in BETA so please don't use it without taking full backups etc! I will release a final version in a week or so.

It was developed on v2 beta 3 but I would imagine it would work on any v2 beta.



1. Add a field to the forum table called "password". Make it CHAR of 50 characters. You can also run this SQL statement:
Code:

ALTER TABLE forum ADD password CHAR (50) not null

forumdisplay.php
Put this on line 33:
PHP Code:

if ($action == "dopassword") {
    if (
md5($password) == md5($foruminfo['password'])) {
        
vbsetcookie("bbforumpass[$forumid]"md5($foruminfo['password']),0);
    } else {
        eval(
"standarderror(\"".gettemplate('error_passwordrequired')."\");");
        exit;
    }
} else {
    if (
$foruminfo['password']) {
        if (
$bbforumpass[$forumid] != md5($foruminfo['password'])) {
             eval(
"standarderror(\"".gettemplate('error_passwordrequired')."\");");
            exit;
        }
    }


showthread.php
Insert on line 114:
PHP Code:


if ($forum['password']) {
    if (
$bbforumpass[$forumid] != md5($foruminfo['password'])) {
        eval(
"standarderror(\"".gettemplate('error_passwordrequired')."\");");
        exit;
    }


admin/forum.php
Line 94:
PHP Code:

  makeinputcode("Forum Password<br>(Max length of 50 characters)","password"); 

Change line 129 from:
PHP Code:

  (forumid,styleid,title,description,active,displayorder,parentid

to

PHP Code:

  (password,forumid,styleid,title,description,active,displayorder,parentid

Change line 119 from:
PHP Code:

  (NULL,'$styleset','".addslashes($title)."','".addslashes($description)."','$isactive','$displayorder','$parentid'

to
PHP Code:

  ('$password',NULL,'$styleset','".addslashes($title)."','".addslashes($description)."','$isactive','$displayorder','$parentid'

Insert on line 194:
PHP Code:

makeinputcode("Forum Password<br>(Max length of 50 characters)","password",$forum[password]); 

Change line 242 from:
PHP Code:

moderateattach='$moderateattach' 

to

PHP Code:

moderateattach='$moderateattach',password='$password' 

Templates
Add a template called error_passwordrequired. In it should be this:
Quote:

A password is required to enter this forum. Please enter it below: <br>
<form action="forumdisplay.php" method="POST">
<input type="password" name="password">
<br>
<input type="hidden" name="action" value="dopassword">
<input type="hidden" name="forumid" value=$foruminfo[forumid]>
<input type="submit" value="Submit">
</form>

03-29-2001 06:37 PM

Very Nice! This will come in very handy....thx James...

03-29-2001 07:11 PM

That make very long time than we wait that!!
Thx very much!!

RaMMSTeiN 06-21-2001 09:47 AM

Quote:

Originally posted by JamesUS
[B]
1. Add a field to the forum table called "password". Make it CHAR of 50 characters. You can also run this SQL statement:
Code:

ALTER TABLE forum ADD password CHAR (50) not null

i have done everything but how do that?? ;) above?? :confused:

kicks 06-21-2001 12:15 PM

You can use phpmyadmin or do it from command line if you have shell access to your server :)

RaMMSTeiN 06-21-2001 05:51 PM

where can i find the PHPadmin?? or the commandline shell....

im just started
a guy had setup our forum, so im a newbee LOL:D

JamesUS 06-21-2001 07:03 PM

Do you have telnet or SSH access to your host?

The Prohacker 06-21-2001 07:21 PM

PHP Code:

<?
require(".global.php");
cpheader();
$DB_site->query("ALTER TABLE forum ADD password CHAR (50) not null");
echo("Database altered successfully. Please ".makelinkcode("click here","./index.php?s=$session[sessionhash]")." to proceed to your Admin CP");
cpfooter();
?>

Put this in a file called pass-install.php
and upload it to your admin dir, now call it from your browser to install the sql for this hack, after installed, delete pass-install.php.

Hopefully this will help

RaMMSTeiN 06-21-2001 07:57 PM

Quote:

Originally posted by JamesUS
Do you have telnet or SSH access to your host?
what is that???
i have a normal 56 K modem, a ISDN line & and a cable modem?? do i have one of the asked things??? ;)

thnx prohacker

JaDy 06-22-2001 07:53 AM

is that working for version 1.1.4 too ?

JamesUS 06-22-2001 06:01 PM

I haven't tried but I doubt it, you'll need to upgrade to 2.0.x

briguy617 06-25-2001 02:53 AM

Is there a final version of this that works with v2.0.0? I tried this, but the line numbers are not accurrate. Or could someone post what is supposed to come immediatly before each of the lines that are supposed to be inserted? Thanks!

RaMMSTeiN 06-26-2001 09:34 AM

Quote:

Originally posted by briguy617
Is there a final version of this that works with v2.0.0? I tried this, but the line numbers are not accurrate. Or could someone post what is supposed to come immediatly before each of the lines that are supposed to be inserted? Thanks!
nope wont work... tryed it also.. :(
but thnx anyway.. for trying.. jamesus

mjames 06-27-2001 05:27 PM

Thanks, James. I will be trying this out and soon as it is finalized and not in beta anymore. Hurry up! :D ;)

glenv 06-27-2001 07:42 PM

How about telling us what this does so we can get excited about it too?

InvictuZ 07-01-2001 05:46 PM

I REALLY NEED THIS FOR 2.0!!!!!!!!!!!!

MrLister 07-02-2001 07:00 PM

how much longer before the auctual one is out?

joebob 07-02-2001 11:22 PM

need one for 2.01!!

Hobbes 02-15-2003 03:59 PM

is this Full Released yet??? i cant wait :D

Dean C 02-17-2003 03:13 PM

No. But someone released a hack similar but it has bugs that were never fixed.

- miSt

McDohl 04-14-2003 01:16 PM

Hey all.

Have a slight problem with this hack. I've done everything it wants but when I try to specify a password it just won't remember it and doesn't prompt me for a password when I try to go into the forum I just placed a password on.

Any ideas? Any help would be appreciated. :)


All times are GMT. The time now is 03:44 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.01329 seconds
  • Memory Usage 1,778KB
  • 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
  • (2)bbcode_code_printable
  • (11)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (21)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