Here's a really short version of how to allow users to select which forums are included in View New Posts-search.
1)
- open "User Profile Fields"
- go to Add New User Profile Field
- select Multiple Selection Checkbox
Set Boxes Per Line to 1
Add all your forums to Options box (1 per line)
Set Field Hidden on Profile to "Yes"
Set Field Searchable on Members List to "No"
Set Show on Members list to "No"
Set "Which Page displays this option" to "Options: Other"
-> Save
2)
- Go to Style Manager
- Select your Style and choose Common templates
- Go to phpinclude_start
- add the following (this is just an example)
if ($bbuserinfo[field11] != '') {
$excl ="&exclude=";
if ($bbuserinfo['field11'] & 1)
{$excl = $excl . "11,";}
if ($bbuserinfo['field11'] & 2)
{$excl = $excl . "21,";}
if ($bbuserinfo['field11'] & 4)
{$excl = $excl . "40,";}
.
.
..rest of the forums...
.
.
$excl= substr("$excl", 0, -1);
}
Some explanations...
field11 is the Field name under "User Profile Fields in Area" before "Display Order"
That 1, 2, 4 is part of a 1,2,4,8,16,32,64... which goes higher and higher and.. it's that bitwise thing that reflects to those options. IMHO this is stupid because it would be much easier to use "[field11] = Yes" type of expression. But then again it's easy when that value is for example 3 which means of course that 1. and 2. options are chosen...
3)
Finally go to edit Navbar template and find those two instances of "getnew" and make those look like "do=getnew$excl">
That's it!
1)
- open "User Profile Fields"
- go to Add New User Profile Field
- select Multiple Selection Checkbox
Set Boxes Per Line to 1
Add all your forums to Options box (1 per line)
Set Field Hidden on Profile to "Yes"
Set Field Searchable on Members List to "No"
Set Show on Members list to "No"
Set "Which Page displays this option" to "Options: Other"
-> Save
2)
- Go to Style Manager
- Select your Style and choose Common templates
- Go to phpinclude_start
- add the following (this is just an example)
if ($bbuserinfo[field11] != '') {
$excl ="&exclude=";
if ($bbuserinfo['field11'] & 1)
{$excl = $excl . "11,";}
if ($bbuserinfo['field11'] & 2)
{$excl = $excl . "21,";}
if ($bbuserinfo['field11'] & 4)
{$excl = $excl . "40,";}
.
.
..rest of the forums...
.
.
$excl= substr("$excl", 0, -1);
}
Some explanations...
field11 is the Field name under "User Profile Fields in Area" before "Display Order"
That 1, 2, 4 is part of a 1,2,4,8,16,32,64... which goes higher and higher and.. it's that bitwise thing that reflects to those options. IMHO this is stupid because it would be much easier to use "[field11] = Yes" type of expression. But then again it's easy when that value is for example 3 which means of course that 1. and 2. options are chosen...
3)
Finally go to edit Navbar template and find those two instances of "getnew" and make those look like "do=getnew$excl">
That's it!
Comment