The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#5
|
|||
|
|||
![]()
In includes/cron/promotion.php, find this and add the line in red:
Code:
SELECT user.joindate, user.userid, user.membergroupids, user.posts, user.reputation, user.usergroupid, user.displaygroupid, user.customtitle, user.username, user.ipoints, YEAR(user.birthday_search) AS birth_year, MONTH(user.birthday_search) AS birth_month, DAY(user.birthday_search) AS birth_day, userpromotion.joinusergroupid, userpromotion.reputation AS jumpreputation, userpromotion.posts AS jumpposts, userpromotion.date AS jumpdate, userpromotion.type, userpromotion.strategy, usergroup.title, usergroup.usertitle AS ug_usertitle, usertextfield.rank More lines to add: Code:
$secondarynames = array(); $titles = array(); $today = getdate(TIMENOW); $min_age = 18; while ($promotion = $vbulletin->db->fetch_array($promotions)) { And another: Code:
$posts = false; $joindate = false; $age = false; // These strategies are negative reputation checking if (($promotion['strategy'] > 7 AND $promotion['strategy'] < 16) OR $promotion['strategy'] == 24) And another: Code:
if ($daysregged >= $promotion['jumpdate']) { $joindate = true; } if ($promotion['birth_year'] > 1900 AND $promotion['birth_month'] >= 1 AND $promotion['birth_month'] <= 12 AND $promotion['birth_day'] >= 1 AND $promotion['birth_day'] <= 31) { $yeardiff = $today['year'] - $promotion['birth_year']; if ($yeardiff > $min_age OR ($yeardiff == $min_age AND ($today['mon'] > $promotion['birth_month'] OR ($today['mon'] == $promotion['birth_month'] AND $today['mday'] >= $promotion['birth_day'])))) { $age = true; } } if ($promotion['strategy'] == 17) { $dojoin = iif($posts, true, false); } Last one: Code:
else if ($promotion['strategy'] == 16 OR $promotion['strategy'] == 24) { $dojoin = iif($reputation, true, false); } else if ($promotion['strategy'] == 32) { $dojoin = iif($age, true, false); } else { switch($promotion['strategy']) Then of course you need to go to the Promotions manager and add a promotion using the new "Age >= 18" strategy. The way promotions work is when the scheduled task runs it will promote everyone who's eligible and who has been active recently. If you want to immediately promote everyone who's eligible, you can run the scheduled task manually from the Scheduled Task manager. |
Благодарность от: | ||
tbworld |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|