JamesUS
29 Mar 2001, 19:27
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:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
forumdisplay.php
Put this on line 33:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
showthread.php
Insert on line 114:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
admin/forum.php
Line 94:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Change line 129 from:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
to
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Change line 119 from:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
to
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Insert on line 194:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Change line 242 from:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
to
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Templates
Add a template called error_passwordrequired. In it should be this:
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>
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:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
forumdisplay.php
Put this on line 33:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
showthread.php
Insert on line 114:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
admin/forum.php
Line 94:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Change line 129 from:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
to
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Change line 119 from:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
to
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Insert on line 194:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Change line 242 from:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
to
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Templates
Add a template called error_passwordrequired. In it should be this:
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>