View Single Post
  #12  
Old 06-24-2010, 08:29 PM
Morgan's Avatar
Morgan Morgan is offline
Administrator
 
Join Date: Jul 2006
Posts: 2,255
Geek Article and Review System License Holder GeekMart License Holder Geek Auto-Linker Pro License Holder Geek Advertising Banner License Holder Geek Gazette License Holder 
Default

Subscribe all users does this:
Code:
if ($action == 'savesubscriptiontools')
{
	$vbulletin->input->clean_array_gpc('p', array(
		'formatall'		=> TYPE_UINT,
		'subscribeall'	=> TYPE_ARRAY_BOOL
	));

	$format 	= $vbulletin->GPC['formatall'];
	$subscribe 	= $vbulletin->GPC['subscribeall'];

	if ($format)
	{
		$db->query_write("UPDATE " . TABLE_PREFIX . "gaz_subscriptions SET emailformat = " . intval($format));
	}

	if (count($subscribe))
	{
		foreach($subscribe AS $newsletterid => $value)
		{
			$newsletterid = intval($newsletterid);
			$db->query_write("UPDATE " . TABLE_PREFIX . "gaz_subscriptions SET newsletter$newsletterid = 1");
		}
	}

	redirect('tools', 'gaz_saved');
}
It depends on what queries you ran. The values in the newsletterX columns in the gaz_subscriptions table are 1 for subscribed and 0 for not.
__________________
Please use the forums for support, feature requests, and similar such things. Support does not include custom code, custom template edits, or third-party modifications. PMs and emails to me should be for private information only, such as login information. If you PM or email me a support question, chances are good that I'll ignore it. Thanks.
While the work or play is on, it is a lot of fun if while you are doing one you don't constantly feel that you ought to be doing the other. -- Franklin Pierce Adams
Reply With Quote