vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Opt-Out Forums from Get New/Get Daily (https://vborg.vbsupport.ru/showthread.php?t=91025)

dsotmoon 10-05-2005 11:06 PM

Quote:

Originally Posted by KirbyDE

That's the line which (re)defines the comma-separated list of excluded forums - add your ID to it.

so it would look like this?

PHP Code:

 $vbulletin->GPC['exclude'] .= ((!$vbulletin->GPC['exclude']) ? $vbulletin->userinfo['excludeforumsgnp'] : '8,' $vbulletin->userinfo['excludeforumsgnp']); 

with the forum id being 8

Andreas 10-05-2005 11:19 PM

Not quite ;)

PHP Code:

$vbulletin->GPC['exclude'] .= ((!$vbulletin->GPC['exclude']) ? $vbulletin->userinfo['excludeforumsgnp'] : ',' $vbulletin->userinfo['excludeforumsgnp']) . ',8'


dsotmoon 10-05-2005 11:38 PM

Quote:

Originally Posted by KirbyDE
Not quite ;)

PHP Code:

$vbulletin->GPC['exclude'] .= ((!$vbulletin->GPC['exclude']) ? $vbulletin->userinfo['excludeforumsgnp'] : ',' $vbulletin->userinfo['excludeforumsgnp']) . ',8'



haha, i was almost close, thanks Kirby

dsotmoon 10-05-2005 11:57 PM

Quote:

Originally Posted by KirbyDE
Not quite ;)

PHP Code:

$vbulletin->GPC['exclude'] .= ((!$vbulletin->GPC['exclude']) ? $vbulletin->userinfo['excludeforumsgnp'] : ',' $vbulletin->userinfo['excludeforumsgnp']) . ',8'


actually i changed that code and it doesnt work, users can still see forumid8 ???

here is what it looks like to be sure

PHP Code:

// Rebuild Bitfields
require_once(DIR '/includes/class_bitfield_builder.php');
vB_Bitfield_Builder::save($db);
build_forum_permissions();]]></uninstallcode>
        </
code>
    </
codes>
    <
templates>
    </
templates>
    <
plugins>
        <
plugin active="1">
            <
title><![CDATA[Opt-Out Forums from "Get New Posts"]]></title>
            <
hookname>search_getnew_start</hookname>
            <
phpcode><![CDATA[if ($vbulletin->userinfo['excludeforumsgnp'])
{
    
$vbulletin->GPC['exclude'] .= ((!$vbulletin->GPC['exclude']) ? $vbulletin->userinfo['excludeforumsgnp'] : ',' $vbulletin->userinfo['excludeforumsgnp']) . ',8';  
}]]></
phpcode>
        </
plugin>
        <
plugin active="1">
            <
title><![CDATA[Opt-Out Forums from "Get New Posts"]]></title>
            <
hookname>profile_editoptions_start</hookname>
            <
phpcode><![CDATA[function fetch_optout_forumids_array($parentid = -1$depthmark '')



Andreas 10-06-2005 12:00 AM

Yeah, it 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

PHP Code:

$vbulletin->GPC['exclude'] .= ',8'

below the }

dsotmoon 10-06-2005 12:03 AM

Quote:

Originally Posted by KirbyDE
Yeah, it 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

PHP Code:

$vbulletin->GPC['exclude'] .= ',8'

below the }

like this

PHP Code:

{
    
$vbulletin->GPC['exclude'] .= ',8';
    
$vbulletin->GPC['exclude'] .= ((!$vbulletin->GPC['exclude']) ? $vbulletin->userinfo['excludeforumsgnp'] : ',' $vbulletin->userinfo['excludeforumsgnp']);  
}]]></
phpcode>
        </
plugin>
        <
plugin active="1">
            <
title><![CDATA[Opt-Out Forums from "Get New Posts"]]></title>
            <
hookname>profile_editoptions_start</hookname>
            <
phpcode><![CDATA[function fetch_optout_forumids_array($parentid = -1$depthmark '')



dsotmoon 10-06-2005 12:05 AM

or this

PHP Code:

{
    
$vbulletin->GPC['exclude'] .= ',8'; ((!$vbulletin->GPC['exclude']) ? $vbulletin->userinfo['excludeforumsgnp'] : ',' $vbulletin->userinfo['excludeforumsgnp']);  
}]]></
phpcode>
        </
plugin>
        <
plugin active="1">
            <
title><![CDATA[Opt-Out Forums from "Get New Posts"]]></title>
            <
hookname>profile_editoptions_start</hookname>
            <
phpcode><![CDATA[function fetch_optout_forumids_array($parentid = -1$depthmark '')



Andreas 10-06-2005 12:05 AM

I said below the }, not below the { ;)
Furthermore, why are you editing the XML?
This won't have any effect (at least as long as you don't reimport it)

dsotmoon 10-06-2005 12:16 AM

Quote:

Originally Posted by KirbyDE
I said below the }, not below the { ;)
Furthermore, why are you editing the XML?
This won't have any effect (at least as long as you don't reimport it)

because i am still learning plugins/products and I dont know where you want me to change this :nervous:

i am confused at which " } " to put it under? the XML?, edit product?

Andreas 10-06-2005 12:18 AM

ACP / Plugin System / Plugin Manager
Locate the Plugin on Hook search_getnew_start for this Hack, click edit.


All times are GMT. The time now is 11:50 AM.

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.01710 seconds
  • Memory Usage 1,786KB
  • 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
  • (9)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete