OK I took another route for some other features, but I am still stuck because I suck at JOIN. Here is the file or plugin I found and added, but now I need to find out how to add the "cellemail" field to the $subscriptions table so I can change the $subscription['email'] to $subscription['cellemail']. Here is spot where I think I need to pull the code for SMS 1.2 I loaded from.
PHP Code:
$vbulletin->db->query_write("
CREATE TABLE IF NOT EXISTS `" . TABLE_PREFIX . "cellsettings` (
`userid` INT NOT NULL ,
`cellnum` VARCHAR( 20 ) NOT NULL ,
`cellprovider` VARCHAR( 5 ) NOT NULL ,
`cellprovidername` VARCHAR( 50 ) NOT NULL ,
`country` VARCHAR( 50 ) NOT NULL ,
`cellemail` VARCHAR( 100 ) NOT NULL ,
`confirm` INT( 4 ) NOT NULL ,
`smsonpm` INT( 4 ) NOT NULL ,
`smscontact` INT( 4 ) NOT NULL ,
`maxtexts` INT( 4 ) NOT NULL ,
`dailytexts` INT( 4 ) NOT NULL DEFAULT '0' ,
PRIMARY KEY ( `userid` )
) ENGINE = MYISAM
");
But this part is throwing me for a loop as well.
PHP Code:
if ($vbulletin->GPC['cellemail'])
{
$cellinfo = $db->query_first("
SELECT cellnum FROM " . TABLE_PREFIX . "cellsettings
WHERE userid = '" . $vbulletin->userinfo['userid'] . "'
LIMIT 1
");
// build their cell email address
$shiznizzle = $db->query_first("
SELECT email FROM " . TABLE_PREFIX . "cellproviders
WHERE id = '" . $vbulletin->GPC['cellemail'] . "'
LIMIT 1
");
$cellemail = "$cellinfo[cellnum]" . $shiznizzle['email'] . "";
The whole file for SMS 1.2 is attached. I tried a couple of different ways to do the join, but I could never get them into the subscription tables.