PDA

View Full Version : Can I give user ability to enable/disable certain forum posts showing up in new posts


Macsee
01-10-2012, 08:21 PM
I've read threads like this one (https://vborg.vbsupport.ru/showthread.php?t=252091) where I can block a forum's posts from showing up in the New Posts feature.

But can I give users the ability to decide if the Foo posts show up in New Posts or not i.e. can they control this setting and block/unblock posts from a certain forum showing up in their New Posts?

LifesGreatestGift
01-10-2012, 08:28 PM
Create a user profile field, allow them to input forum IDs separated by commas that they dont want displayed.

Then wrap a conditional around the link in navbar

<vb:if conditon="$bbuserinfo['fieldxx']">search.php?do=getnew&contenttype=vBForum_Post&exclude={vb:raw bbuserinfo.fieldxx}<vb:else />search.php?do=getnew&contenttype=vBForum_Post</vb:if>

Pretty sure that is the correct conditional use. But you get the idea.

replace the xx with the id of the custom user profile field.

Macsee
01-11-2012, 07:22 PM
Cool, thanks very much.

LifesGreatestGift
01-11-2012, 07:52 PM
No problem. Only thing is your members finding the forum ID's. you could make a thread for them with the forum names and the IDs beside them

Depending on the URL structure of your forum you can find the ID of the forum by just hovering over the forum link as well.

Make sure they know to add the forums in the following format
2,22,43,33,11

no spaces and no comma at the end.

Macsee
01-12-2012, 10:54 AM
It appears that members don't need to know the forum numbers. When I create the user profile fields I can set names for the forums and members can choose names rather than numbers from a drop down list. There's even the option for multiple choices (though I'd have to explain to them how to use the Control key to make multiple choices :))

rbc1225
01-12-2012, 02:58 PM
Ok sorry guys, extremly newbie question here. What do you mean when you say "wrap a conditional around the link in navbar" and also how do I find the ID of the custom user field? Again sorry just now venturing out to the coding side of things.

--------------- Added 1326384137 at 1326384137 ---------------

Ok sorry, I found the ID of the custom field. In my case it is field6 as shown in the edit custom function screen.