php forum
php mysql forum
php mysql smarty
 
Page 1 of 2 1 2 >
Topic Options
#203420 - 07/10/05 07:18 PM [6.7] [beta] Hide Private Forums
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396

   [6.7] [beta] Hide Private Forums to Del.icio.us Add to del.icio.us
  Digg [6.7] [beta] Hide Private Forums Digg it
Modification Name: Hide Private Forums

Author(s): LK

Description: Hides the private forums (from forum summary), only if you have access to those forums you can see them.

All-new code (nothing in common with the previous 6.5 version, besides the concept), now supports ultimatebb.php. Almost untested though.

Demo: none

Requirements: UBB 6.7, may work with others with little changes.

Download Link: http://www.ubbdev.com/ubb/upload/00004463/hide67.txt

Credits: Originally by wwb95

Note: it doesn't support password-enabled forums.
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#203421 - 07/10/05 11:52 PM Re: [6.7] [beta] Hide Private Forums
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25411
Loc: Texas
thank you! I can finally use a private forum on my personal site now rockon rockon
_________________________
- Allen wavey
- What Drives You?

Top
#203422 - 07/11/05 07:21 AM Re: [6.7] [beta] Hide Private Forums
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
Updated ultimatebb.php (global $profile, chop), ubb_lib (make it repetitive in case you have more than 1 private forum)
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#203423 - 07/12/05 07:09 PM Re: [6.7] [beta] Hide Private Forums
nprime Offline
Lurker

Registered: 10/06/01
Posts: 8
LK,
Thanks for doing this. I am unable to find the following code in ubb_forum_summary.cg:.

Code:
$msg_icon2    = qq!<img src="$vars_config{NonCGIURL}/icons/icon1.gif" align="middle" border="0" alt="$vars_wordlets_img{alt_icon} 1" /> !;
} else {
The closest I can find is the following
Code:
$msg_icon2    = qq!<img src="$vars_config{NonCGIURL}/icons/icon1.gif" align="middle" border="0" alt="$vars_wordlets_img{alt_icon} 1" />&nbsp;!;
}
I went back to my unmodded 6.7.2 file and still can't find it in there. Any ideas?

Top
#203424 - 07/12/05 07:27 PM Re: [6.7] [beta] Hide Private Forums
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
Oops, you're right.
It should be:
Code:
Find:
=====

			$msg_icon     = '';
			$msg_icon2    = qq!<img src="$vars_config{NonCGIURL}/icons/icon1.gif" align="middle" border="0" alt="$vars_wordlets_img{alt_icon} 1" /> !;

Add below:
==========

			$priv1="<?php echo Privates($x,"";
			$priv2=""); ?>";
		} else {
			$priv1 = ''; $priv2 = '';
(updating txt file as we speak)

Note that msg_icon and msg_icon2 should be indeed one after the other, since about 10 lines above there is another instance of $msg_icon = '' and $msg_icon2 = ..., but they have another variable ($last_post_number) between them.
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#203425 - 07/16/05 10:50 PM Re: [6.7] [beta] Hide Private Forums
Tiger66 Offline
Member

Registered: 03/31/04
Posts: 58
Loc: Israel
Kewl hack, it looks like my board even loads faster now
Thanks thumbsup

Top
#203426 - 07/20/05 05:55 PM Re: [6.7] [beta] Hide Private Forums
Tiger66 Offline
Member

Registered: 03/31/04
Posts: 58
Loc: Israel
Would it be possible to hide the wings as well? it looks weird for the members to see a wing with no rooms

And I just noticed that the rooms you set to be hidden still shows under the Hop To menu (even if you are logged out)

Top
#203427 - 07/22/05 11:12 AM Re: [6.7] [beta] Hide Private Forums
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
By wings, you mean categories? If so you can just put the private forums in another category.

Hop To: I'll fix it if there is a need.

The point of this hack is not that they won't know you have private forums, but that they won't be disturbed by that forum every time they go to Forum Summary. I don't know of anyone who actually uses the Hop To menu, so it doesn't really matter.
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#203428 - 07/22/05 02:42 PM Re: [6.7] [beta] Hide Private Forums
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25411
Loc: Texas
one guy on the beta team does, I haven't seen him in ages wink
_________________________
- Allen wavey
- What Drives You?

Top
#203429 - 07/22/05 09:26 PM Re: [6.7] [beta] Hide Private Forums
Tiger66 Offline
Member

Registered: 03/31/04
Posts: 58
Loc: Israel
Yes by wings I ment categories, sorry, I did put it on another category just that when you have allot of staff rooms then you get a pretty big wing so was just wondering if it's possible to hide the categories too.

Thanks

Top
#203430 - 07/23/05 06:09 AM Re: [6.7] [beta] Hide Private Forums
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
Untested:
Open public_forum_summary.pl.
Find in sub CategoryStrip:
Code:
	return qq~
Replace with:
Code:
$abcdefg = qq~
Find:
Code:
} # end CategoryStrip
Add ABOVE:
Code:
if ($catarray->[2] eq "NUMBER") {
return '<?php echo Privates(NUMBER2,"'.UBBCGI::escape($abcdefg) . '"); ?>';
} else {
return $abcdefg;
}
Now replace NUMBER with your private category number (click on the category, the number after "category=" is the category number), and replace NUMBER2 with a number of one of your hidden forums.
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#203431 - 07/25/05 07:55 PM Re: [6.7] [beta] Hide Private Forums
Tiger66 Offline
Member

Registered: 03/31/04
Posts: 58
Loc: Israel
Ok just tested it
If you set one room for mods and one for admins and log in as admin then it's fine

When you log as a mod then the room you see is merged with the category above, when you log as a member the only thing it shows is that :
Forum Topics Posts Last Post

line at the bottom of the last displayed category

And thanks LK

Top
#203432 - 07/25/05 08:02 PM Re: [6.7] [beta] Hide Private Forums
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
1) You should change NUMBER2 to the number the mods can see.
2) That's odd.. What do you mean by "that line at the bottom of the last displayed category"? can I see a screenshot?
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#203433 - 07/26/05 08:23 PM Re: [6.7] [beta] Hide Private Forums
Tiger66 Offline
Member

Registered: 03/31/04
Posts: 58
Loc: Israel
Sorry I choosed the wrong number for the NUMBER2, it fixed both issues , now it just shows this when you are logged out

http://img.photobucket.com/albums/v111/tigerboy/softwares/cap2.jpg

That is my last public category on my board and there's nothing beneath it (except for a hidden wing which is working fine) The icon legend red X is not related, but somehow this gray line with the "0"'s started to appear after adding this mod (maybe something with my style settings?) , and this line at the bottom appeared after adding your modifications for the hidden wing (but both things shows only when you are logged out)

And another thing I hope it's ok to ask here, is it possible to set a different new posts icon for just one forum? for example on ubbdev something else instead of this lightbulb to appear on the new posts column next to just one forum
(I know there's an option for this on the Style Sheets I create but it doesn't change anything)

Thanks again smile

Top
#203434 - 03/30/06 11:11 PM Re: [6.7] [beta] Hide Private Forums
Nightcrawler Offline
User

Registered: 12/17/03
Posts: 47
Loc: San Diego
Quote:
Originally posted by LK:

By wings, you mean categories? If so you can just put the private forums in another category.

Hop To: I'll fix it if there is a need.

The point of this hack is not that they won't know you have private forums, but that they won't be disturbed by that forum every time they go to Forum Summary. I don't know of anyone who actually uses the Hop To menu, so it doesn't really matter.


Actually, I have a secret forum that I'd like to keep secret. How would I hide the forum from "hop to."

Top
#203435 - 04/01/06 03:45 PM Re: [6.7] [beta] Hide Private Forums
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
Try the following:
in public_common.pl, find: (TWICE)
Code:
			next FORUM if $vars_forums{$f}->[3] ne "On";
Add below:
Code:
			next FORUM if $f == NUMBER;
Replace NUMBER with the number of the forum you'd like to hide, for example if you'd like to hide forum 3 add:
Code:
			next FORUM if $f == 3;
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#203436 - 04/01/06 04:13 PM Re: [6.7] [beta] Hide Private Forums
Nightcrawler Offline
User

Registered: 12/17/03
Posts: 47
Loc: San Diego
Wow. That works beautifully. Thanks! thumbsup

I did notice one other thing that happens with this hack. When I'm logged out, I can see a 0 directly below the Recent Visitors row. It doesn't show when I'm logged in as an Admin (and can see the hidden forum) or as one of my dummy accounts (who can't see the forum) - just when I'm not logged in at all.

http://www.legionworld.net/cgi-bin/ultimatebb.cgi

Top
#203437 - 04/01/06 04:19 PM Re: [6.7] [beta] Hide Private Forums
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
Where is the hidden forum located (if I could see it)? Is it under "Science Police Headquarters"?
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#203438 - 04/01/06 04:20 PM Re: [6.7] [beta] Hide Private Forums
Nightcrawler Offline
User

Registered: 12/17/03
Posts: 47
Loc: San Diego
It's forum #6, so it shows above "Encyclopedia Galactica."

I can give you the log in details to one of my dummy accounts and give it permission to the forum, if you need it.

Top
#203439 - 04/03/06 09:16 AM Re: [6.7] [beta] Hide Private Forums
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
That's odd... Try the following in ubb_lib.cgi:
Find:
Code:
sub check_private_access2 {
	my (@profile, $Moderator);
	&RequireVars("$vars_config{VariablesPath}/vars_mods.cgi");

	# since forum is private, user must be logged in

	# $_[0]: forum number
	# $_[1]: forum password (blank, if none)

	if (!$username) { return 0; }
Repalce with:
Code:
sub check_private_access2 {
	my (@profile, $Moderator);
	&RequireVars("$vars_config{VariablesPath}/vars_mods.cgi");

	# since forum is private, user must be logged in

	# $_[0]: forum number
	# $_[1]: forum password (blank, if none)

	if (!$username) { return ""; }
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
Page 1 of 2 1 2 >


Moderator:  Charles, Gizmo 
Top Posters Last 30 Days
AllenAyres 13
Gizmo 10
willing 2
S7ARBVCK 2
MattUK 1
Kevin H 1
tackaberry 1
Who's Online
0 Registered (), 21 Guests and 6 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Noob - need help, or a reality check!
by Gizmo
Yesterday at 03:21 AM
Here I am! Rock me like a Hurricane!
by AllenAyres
09/02/08 03:05 PM
[7.x] Generic Page Outside of forum directory
by Gizmo
08/30/08 05:43 PM
Team UBBDev Rides Again!
by Gizmo
08/28/08 11:45 PM
Multiple Identity Detector
by MattUK
08/28/08 04:10 PM
[7.3.x] ubb.links
by AllenAyres
08/26/08 09:57 AM
Installing FlashChat with 7.3
by Gizmo
08/23/08 05:36 AM
New Mods
Installing FlashChat with 7.3
by Paug
08/23/08 12:14 AM
[7.3.x] ubb.links
by AllenAyres
06/20/08 11:50 PM
[7.2.1] - Naked shoutbox
by sirdude
08/17/07 10:36 PM
[7.x] Generic Page Outside of forum directory
by
01/14/07 10:58 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
Newest Members
veedubb8, twentyseven, Claus1, welcomeback1, Paug
13327 Registered Users

 

 

 
fusionbb message board php hacks