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!
anyone mind doing this for me? :|
Maybe if your lucky Dan mate. Improve your MP3 Top Trumps score.
Link14716
04-10-2005, 12:58 AM
In includes/functions_newpost.php, find:
// ### 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'], $bbuserinfo, 9999);
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:
if (!in_array($foruminfo['forumid'], array(X, Y, Z))) {
// All that ++++ here.
}
In your newreplys and newthread templates, find:
<if condition="$show['member']">
<fieldset class="fieldset">
<legend>$vbphrase[thread_subscription]</legend>
Replace with:
<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.
shiva
05-06-2005, 12:28 AM
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, 02:58 PM
Just empy table "subscribethread"
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.