|
|
Joined: Feb 2001
Posts: 143
Member
|
Member
Joined: Feb 2001
Posts: 143 |
I search for a Hack, which allows only registered users to read in a Forum. Unregistered Users are supposed to be able to read only the main page. I would be pleased with an answer.
|
|
|
|
Joined: May 2001
Posts: 6,708
Member
|
Member
Joined: May 2001
Posts: 6,708 |
There is an Option in General Display Settings to turn off guest viewing. But they can't see the main page. When they try to access it they will reach a login page.
|
|
|
|
Joined: Feb 2001
Posts: 143
Member
|
Member
Joined: Feb 2001
Posts: 143 |
Thanks, I know that. But the login screen should appear, first if a unregistered user wants to enter a forum.
:rolleyes:
|
|
|
|
Joined: Nov 2001
Posts: 1,704
Moderator / Da Masta
|
Moderator / Da Masta
Joined: Nov 2001
Posts: 1,704 |
Try this... Open ubb_forum.cgi, find: code:
# determine path for the forum files $permission = $this_forum[6]; $exact_path = "Forum$in{f}"; if ($permission =~ m/private/) {
$exact_path .= "/private-$this_forum[7]";
# does user have permission to enter? &check_private_access($in{f}, $this_forum[12]);
}
Add after: code: [qb] # check to see if user is logged in if (($username eq '') && ($password eq '')) { &StandardHTML("$vars_wordlets_err{not_logged_in}"); } [/qb] Open ubb_get_topic.cgi, find: code:
# determine exact path & check permission if necessary my $permission = $this_forum[6]; $exact_path = "Forum$_[0]"; if ($permission =~ m/private/) {
$exact_path .= "/private-$this_forum[7]";
# does user have permission to enter? &check_private_access($_[0], $this_forum[12]);
}
Add after: code: [qb] # check to see if user is logged in if (($username eq '') && ($password eq '')) { &StandardHTML("$vars_wordlets_err{not_logged_in}"); } [/qb] Hope that works for you.
|
|
|
|
Joined: May 2001
Posts: 6,708
Member
|
Member
Joined: May 2001
Posts: 6,708 |
quote: Originally posted by J.o.h: Thanks, I know that. But the login screen should appear, first if a unregistered user wants to enter a forum.
:rolleyes: Sheesh sorry, just a misunderstanding. :rolleyes:
|
|
|
|
Joined: Feb 2001
Posts: 143
Member
|
Member
Joined: Feb 2001
Posts: 143 |
Thanks! I'll try it soon!
|
|
|
|
Joined: Feb 2001
Posts: 143
Member
|
Member
Joined: Feb 2001
Posts: 143 |
Works great! Credits for you!
|
|
|
|
Joined: May 2002
Posts: 362
Junior Member
|
Junior Member
Joined: May 2002
Posts: 362 |
Whoa! Great, perfect, awesome hack! I've been asking about something similar to this for quite a while. A quick question though, any chance you could make it so you must be logged in to view today's active topics, also to view the calendar if you have that hack?
One more thing I just noticed - if you click the link after welcome to the newest member "Joeblue" - you can read their profile, is there any way to require login for this too?
Again, thank you sooooooo much!
|
|
|
|
Joined: May 2002
Posts: 362
Junior Member
|
Junior Member
Joined: May 2002
Posts: 362 |
It works perfectly! Thank you sooooo very much!
|
|
|
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.
|
|
Posts: 417
Joined: November 2001
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|