Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 04-04-2005, 12:31 PM
Dan's Avatar
Dan Dan is offline
 
Join Date: Dec 2002
Location: Titusville, Florida
Posts: 1,787
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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!
Reply With Quote
  #2  
Old 04-06-2005, 11:19 AM
Dan's Avatar
Dan Dan is offline
 
Join Date: Dec 2002
Location: Titusville, Florida
Posts: 1,787
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyone mind doing this for me? :|
Reply With Quote
  #3  
Old 04-10-2005, 12:38 AM
pie pie is offline
 
Join Date: May 2003
Location: Devon, England
Posts: 226
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Maybe if your lucky Dan mate. Improve your MP3 Top Trumps score.
Reply With Quote
  #4  
Old 04-10-2005, 12:58 AM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 04-10-2005, 01:31 AM
Dan's Avatar
Dan Dan is offline
 
Join Date: Dec 2002
Location: Titusville, Florida
Posts: 1,787
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I love you Matt xD
Reply With Quote
  #6  
Old 05-06-2005, 12:28 AM
shiva shiva is offline
 
Join Date: Apr 2002
Posts: 158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 07-23-2008, 02:58 PM
diendo diendo is offline
 
Join Date: Jan 2007
Location: HCM City
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just empy table "subscribethread"
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:45 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.04153 seconds
  • Memory Usage 2,242KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete