Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Mod Name / Version: Password Protected Forums 1.0

Description: This will allow you to password protect specific forums - similar to UBB.Classic.

Features:
  • You can define the password to a forum when you create or edit the forum
  • You can remove the password from a forum simply by editing the forum.
  • Passwords are safe and secure - same as Threads using one way MD5 encryption
  • If a user visits a password protected forum, it'll prompt them for the password then return them to the forum.
  • On the password page for the forum it'll tell them if they need access to the forum or are having trouble logging in to contact the moderators of that forum. Then it will list links to all the moderators of the forum.
  • After they've entered the correct password, it'll redirect them back to where they were.
  • If they use a "backside" link to showflat, showthreaded, printthread, postlist, printthread, newpost or newreply attempting to get access to the forum, it'll still prompt them for the password, then redirect them to where they were trying to go
  • The encrypted password for the forum is stored in a cookie - so they need only enter it once. And as long as they don't logout they'll have access and see all threads there so they won't need to enter the password repeatedly.
  • I've made this work with cookies or sessions, however with sessions a cookie is used to track access to the password protected forums throughout the length of the browser session.
  • If you allow the guest (unregistered) group to have access to and view the forum, they can access with the password as well. The cookie giving access will last the length of the browser session.
  • I've added an extra config variable so you can determine if everyone must enter the password to view the forum, or if admins, or admins & moderators are exempt from having to enter the password. This is handy if you want Admins to have total access, so they can monitor the posts without having to know the password.
  • Moderators can edit their own forums from the Admin menu - and change the password there if they wish.
  • If you need to "lock everyone out" and start fresh, changing the password to a forum will require everyone to reenter the new password, even if they already have a cookie for the forum.
  • If the user has not yet entered the password for a protected forum, the main index will hide the subject of the Last Post and name of the last poster in the Last Post column indicating that the forum is password protected. Once they enter the password for this forum, they will see this information as normal.
  • If the user has not yet entered the password for a protected forum, any search results including "posts by this user" and "posts within the last x hours/days" will hide the subject of the post and the posters name, indicating it's a password protected forum. Once they enter the password for this forum, this information will appear as normal.
  • All text strings are in language files.
  • The Forum login page is templated.




Working Under: UBB.Threads 6.3

Mod Status: Beta

Any pre-requisites: none

Author(s): JoshPet of www.JoshuaPettit.com

Date: 08/11/03

Credits: Commissioned by JC for http://www.roleplayworlds.com

Files Altered: /admin/viewboard.php, /admin/doeditboard.php, /admin/createboard.php, /admin/docreate.php, postlist.php, showflat.php, showthreaded.php, newpost.php, newreply.php, printthread.php, logout.php, ubbt.inc.php, ubbthreads.php, dosearch.php, /languages/****/admin/generic.php, /languages/****/ubbthreads.php, /languages/****/dosearch.php

New Files: boardlogin.php, doboardlogin.php, /templates/default/boardlogin.tmpl, /languages/****/boardlogin.php

Database Altered: Bo_Password field added to w3t_Boards table

Info/Instructions: Optional variable added to the config file to offer access without passwords to administrators and/or moderators.

Disclaimer: Please backup every file that you intend to modify.
If the modification modifies the database, it's a good idea to backup your database before doing so.

Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.


Attachments

Sponsored Links
Joined: Aug 2002
Posts: 218
Member
Member
Offline
Joined: Aug 2002
Posts: 218
Joshpet I want a child from you

This is what I've waited for. Do you think that this will also work with 6.2.3?


Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
[]jluerken said:
Joshpet I want a child from you

This is what I've waited for. Do you think that this will also work with 6.2.3?

[/]

LOL

It would probably need some adjusting to the queries on all the scripts - but it should work.

Joined: Aug 2002
Posts: 218
Member
Member
Offline
Joined: Aug 2002
Posts: 218
[]JoshPet said:
[]jluerken said:
Joshpet I want a child from you

This is what I've waited for. Do you think that this will also work with 6.2.3?

[/]

LOL

It would probably need some adjusting to the queries on all the scripts - but it should work. [/]

Is it possible that you add the info for 6.2.3 to the instructions?

Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Not sure if I'm really going to have time to do that anytime soon. I've got too many paying projects on my plate right now. It's probably not hard.... I just developed this for a client who was running 6.3.1.... and I share anything I'm hired to develop here.

In every script postlist.php, showflat.php and showthreaded.php etc... the Board query will be different (becuase the Board keyword no longer needs to be passed in the URL in 6.3), so the trick will simply be adding Bo_Password to the end of the existing query, rather than using the code that I've included.

Likewise the login scripts - when it returns a user to a post - in 6.2 series it will need to pass the board keyword in the URL to properly look up the post.

That was the fundamental change between 6.2 and 6.3.

Unless commissioned to do otherwise, I develop new stuff for the current release.

If you can't figure it out it'll give you good reason to upgrade.

Joined: Aug 2002
Posts: 218
Member
Member
Offline
Joined: Aug 2002
Posts: 218
No chance to make this on my own and the upgrade is a hard way cause I've 39 hacks installed and this is a pain in the ass for every upgrade

Could become a little bit tricky and a lot of work I guess *hrhrhr*

Anyone time enough to write an instruction for 6.2.3?

Joined: Aug 2002
Posts: 218
Member
Member
Offline
Joined: Aug 2002
Posts: 218
Hey Josh, I've seen that I can read headers from the password protected forum in the CURRENT THREADS box here in the forum

A little update to the hack that those threads are not displayed would be nice cause even headers can tell the people enough to argue

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
OK, if you are using JustDave's IIP or SideBar Pal..... I had first thought of modifing the pals to hide subjects and such of restricted forums.... but with cached results that's not possible.
So it's best to exclude password protected forums from any pal boxes

In index.php or sidebarpal.php find this:
Code
<br />		$query = "<br />			SELECT Bo_Keyword,Bo_Title,Bo_Write_Perm,Bo_Reply_Perm,Bo_Read_Perm<br />			FROM {$config['tbprefix']}Boards<br />			WHERE Bo_Keyword != ''<br />			$andexclude<br />			$groupquery<br />			$catonly<br />		";<br />


Change to this:
Code
<br />		$query = "<br />			SELECT Bo_Keyword,Bo_Title,Bo_Write_Perm,Bo_Reply_Perm,Bo_Read_Perm<br />			FROM {$config['tbprefix']}Boards<br />			WHERE Bo_Keyword != ''<br />			AND Bo_Password = ''<br />			$andexclude<br />			$groupquery<br />			$catonly<br />		";<br />



Joined: Aug 2002
Posts: 218
Member
Member
Offline
Joined: Aug 2002
Posts: 218
@Josh: Do you have forgotten me?

Sponsored Links
Joined: Aug 2003
Posts: 15
Newbie
Newbie
Offline
Joined: Aug 2003
Posts: 15
Any chance this can be updated for use in 6.5?

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
It could be done...although it's probably a good bit of work. None of my clients have needed it in 6.5 so it hasn't made it's way to the top of the list.

Joined: Aug 2003
Posts: 15
Newbie
Newbie
Offline
Joined: Aug 2003
Posts: 15
If ya get around to it, coolies, if not I will make do with out it.

Was a very useful item in 6.3, and really hated to loose it when I switched to 6.5 LOL, but eh, 6.5 is almsot worth loosing it.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)