The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
Is award automation SQL Cron proper for membergroupids
In regards of:
https://vborg.vbsupport.ru/showthread.php?p=2568256 ( YaAS-Automation-R4.zip ) There's this specific code in the file that handles the membergroupid's for giving automated awards. Code:
// USERGROUP AWARDS $usergroupAwards = $vbulletin->db->query_read(" SELECT * FROM " . TABLE_PREFIX . "award_automation WHERE (auto_active=1) AND (auto_type='usergroup') "); while ($usergroupAwardsArray = $vbulletin->db->fetch_array($usergroupAwards)) { $getUsersWithGroup = $vbulletin->db->query_read(" SELECT userid FROM " . TABLE_PREFIX . "user WHERE (usergroupid=$usergroupAwardsArray[auto_criteria]) OR " . $usergroupAwardsArray[auto_criteria] . " IN (membergroupids) "); while ($array3 = $vbulletin->db->fetch_array($getUsersWithGroup)) { $checkUsergroupAward = $vbulletin->db->query_read(" SELECT userid, award_id FROM " . TABLE_PREFIX . "award_user WHERE (userid=$array3[userid]) AND (award_id=$usergroupAwardsArray[auto_awardid]) "); $alreadyissued = $vbulletin->db->num_rows($checkUsergroupAward); if (empty($alreadyissued)) { // Issue New Usergroup Award $vbulletin->db->query_write("INSERT INTO " . TABLE_PREFIX . "award_user (award_id, userid, issue_reason, issue_time, award_cgroup) VALUES ('$usergroupAwardsArray[auto_awardid]', '$array3[userid]', '" . addslashes($usergroupAwardsArray['auto_issuereason']) . "', " . time() . ", 'usergroup')"); } } } |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|