vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Request - Turn off Subscriptions for Everyone in Certain forums (https://vborg.vbsupport.ru/showthread.php?t=79320)

Dan 04-04-2005 11:31 AM

Request - Turn off Subscriptions for Everyone in Certain forums
 
I'm basically looking for a hack that will NOT allow you to have subscriptions in certain forums. The one that I'm currently using it for on two of the forums I run are where guild recruitment apps go and moderator apps go also. I want my staff/guild officers to be able to comment on the person who applied (already setup to view them with permissions but I turned off posting because of the auto subscribe feature). So anyone willing to do this for me? I'd be very very very happy if you did it!

Dan 04-06-2005 10:19 AM

anyone mind doing this for me? :|

pie 04-09-2005 11:38 PM

Maybe if your lucky Dan mate. Improve your MP3 Top Trumps score.

Link14716 04-09-2005 11:58 PM

In includes/functions_newpost.php, find:
PHP Code:

    // ### DO EMAIL NOTIFICATION ###
    
if ($post['visible'] AND !$prevpostfound AND $type != 'thread' AND !in_coventry($bbuserinfo['userid'], true))
    {
        
// Send out subscription emails
        
exec_send_notification($threadinfo['threadid'], $bbuserinfo['userid'], $post['postid']);
    }

    
// ### DO THREAD SUBSCRIPTION ###
    
if ($bbuserinfo['userid'] != 0)
    {
        require_once(
'./includes/functions_misc.php');
        
$post['emailupdate'] = verify_subscription_choice($post['emailupdate'], $bbuserinfo9999);

        if (!
$threadinfo['issubscribed'] AND $post['emailupdate'] != 9999)
        { 
// user is not subscribed to this thread so insert it
            
$DB_site->query("INSERT IGNORE INTO " TABLE_PREFIX "subscribethread (userid, threadid, emailupdate, folderid)
                    VALUES (
$bbuserinfo[userid]$threadinfo[threadid]$post[emailupdate]$post[folderid])");
        }
        else
        { 
// User is subscribed, see if they changed the settings for this thread
            
if ($post['emailupdate'] == 9999)
            {    
// Remove this subscription, user chose 'No Subscription'
                
$DB_site->query("DELETE FROM " TABLE_PREFIX "subscribethread WHERE threadid = $threadinfo[threadid] AND userid = $bbuserinfo[userid]");
            }
            else if (
$threadinfo['emailupdate'] != $post['emailupdate'] OR $threadinfo['folderid'] != $post['folderid'])
            {
                
// User changed the settings so update the current record
                
$DB_site->query("REPLACE INTO " TABLE_PREFIX "subscribethread (userid, threadid, emailupdate, folderid)
                    VALUES (
$bbuserinfo[userid]$threadinfo[threadid]$post[emailupdate]$post[folderid])");
            }
        }
    } 

Surround it with this:
PHP Code:

if (!in_array($foruminfo['forumid'], array(XYZ))) {
// All that ++++ here.


In your newreplys and newthread templates, find:
PHP Code:

<if condition="$show['member']">
                <
fieldset class="fieldset">
                    <
legend>$vbphrase[thread_subscription]</legend

Replace with:
PHP Code:

<if condition="$show['member']&& !in_array($foruminfo['forumid'], array(X, Y, Z))">
                <
fieldset class="fieldset">
                    <
legend>$vbphrase[thread_subscription]</legend

Replacing X, Y, Z with the forumids of the forums you want it disabled in, of course.

Dan 04-10-2005 12:31 AM

I love you Matt xD

shiva 05-05-2005 11:28 PM

I would love you even more if you knew of a way to prevent certain usergroups from using thread subscriptions while allowing access to other usergroups. :)

diendo 07-23-2008 01:58 PM

Just empy table "subscribethread"


All times are GMT. The time now is 07:18 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.01995 seconds
  • Memory Usage 1,745KB
  • 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
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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