Quote:
Originally Posted by IrPr
Thanks Paul !
I'm using this plugin with "Opt-Out Forums from Get New Posts" by Andreas and i had trouble when i exclude some forums from Get New Posts, then i had modified Paul's Hack to make integration with
Find:
PHP Code:
$xforum_ids = array_keys($vbulletin->forumcache);
Below that, Add:
PHP Code:
$exclude = explode(",",$vbulletin->userinfo['excludeforumsgnp']);
Now Find:
PHP Code:
if ( !($xfperms & $vbulletin->bf_ugp_forumpermissions['canview']) OR !($xfperms & $vbulletin->bf_ugp_forumpermissions['cansearch']))
Replace with:
PHP Code:
if ( !($xfperms & $vbulletin->bf_ugp_forumpermissions['canview']) OR !($xfperms & $vbulletin->bf_ugp_forumpermissions['cansearch']) OR (in_array($xforum_id, $exclude)))
|
Thats great IrPr
I added your code to our own forum and it works maginificently.
I tried to take it a bit futher by modifying Andreas's Opt-Out Forums from Get New/Get Daily MOD with default forum exclusions. Which works however the Display count of unread posts in welcome box still picks up new posts, although it will not list them.
I was hoping perhaps someone here could help figure out what changes need to be done for it to work fully with the modifications.
Code:
PHP Code:
$xforum_ids = array_keys($vbulletin->forumcache);
Below that, Add:
PHP Code:
$exclude = explode(",",$vbulletin->userinfo['excludeforumsgnp']);
Now Find:
PHP Code:
if ( !($xfperms & $vbulletin->bf_ugp_forumpermissions['canview']) OR !($xfperms &
$vbulletin->bf_ugp_forumpermissions['cansearch']))
Replace with:
PHP Code:
if ( !($xfperms & $vbulletin->bf_ugp_forumpermissions['canview']) OR !($xfperms &
$vbulletin->bf_ugp_forumpermissions['cansearch']) OR (in_array($xforum_id, $exclude)))
Opt-Out Forums from Get New Daily changes:
To have one specific forum thats will not show up at all in new posts
ACP / Plugin System / Plugin Manager. Locate the Plugin on Hook search_getnew_start for this Hack, click edit.
Find and edit
Code:
The comma-separated list of excluded forums - add your ID to it.
$vbulletin->GPC['exclude'] .= ((!$vbulletin->GPC['exclude']) ? $vbulletin->userinfo['excludeforumsgnp'] : ',' . $vbulletin->userinfo['excludeforumsgnp']) . ',8';
With the forum id being 8
This only kicks in if the user has defined custom excludes as well.
If you want it to be always active, undo the edit and place
Code:
$vbulletin->GPC['exclude'] .= ',8';
below the }
*** all of these changes work nicely however the Display unread will only filter out excluded forums completely if it is done via the user control panel. Otherwise(this method) it partially filters out the new posts. ex: it shows a new post(no.) but will not display them when clicked on.
Anyone know what needs to be done to get the Display to filter out the excluded forums completely?