vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Can I give user ability to enable/disable certain forum posts showing up in new posts (https://vborg.vbsupport.ru/showthread.php?t=276754)

Macsee 01-10-2012 08:21 PM

Can I give user ability to enable/disable certain forum posts showing up in new posts
 
I've read threads like this one 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

Code:

<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 [DATE]1326384137[/DATE] at [TIME]1326384137[/TIME] ---------------

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


All times are GMT. The time now is 01:13 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01092 seconds
  • Memory Usage 1,720KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete