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')"); } } } |
#2
|
|||
|
|||
The problem is this part in the second query:
PHP Code:
PHP Code:
|
#3
|
|||
|
|||
Aha, so everything after the comma was being ignored, thanks! It appears to work properly now . Are you by any chance able to help to 'remove' awards from the user that is no longer part of the usergroup?
|
#4
|
|||
|
|||
I wouldn't know about that, I have never used that mod before.
|
#5
|
||||
|
||||
The best place to ask questions regarding features and usage of a product is in the thread for that product. Developers are much more likely to read posts in their product threads than threads posted in the general discussion forums...and who better to address a question about a product than the one who created it?
|
Благодарность от: | ||
Lynne |
#6
|
||||
|
||||
Quote:
|
#7
|
|||
|
|||
Quote:
Refer to http://stackoverflow.com/a/4156063 |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|