The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#4
|
|||
|
|||
![]()
Well, I guess it's easier because I have it done already, but it requires changing files. It does take advantage of the promotion code that uses a scheduled task to add a secondary group to a user. You could write your own code and use a plugin with one of the cron hooks and then you wouldn't need to modify any files, but you'd have to handle it all yourself.
I'll post my changes and you can use it or do it a different way (even if you don't use these, you might look at promotion.php and see how it works). Anyway, in admincp/usergroup.php, find: Code:
foreach($promotions AS $groupid => $promos) { print_table_header("$vbphrase[promotions]: <span style=\"font-weight:normal\">" . $vbulletin->usergroupcache["$groupid"]['title'] . ' ' . construct_link_code($vbphrase['add_new_promotion'], "usergroup.php?" . $vbulletin->session->vars['sessionurl'] . "do=updatepromotion&usergroupid=$groupid" . ($vbulletin->GPC['returnug'] ? '&returnug=1' : '')) . "</span>", 8); print_cells_row(array( $vbphrase['usergroup'], Then find this and add the section in red, and change the lines in blue: Code:
else if ($promotion['strategy'] == 18) { $type = $vbphrase['join_date']; } else if ($promotion['strategy'] == 32) { $type = 'Age >= 18'; } else { $type = $vbphrase['promotion_strategy' . ($promotion['strategy'] + 1)]; } print_cells_row(array( "<b>$promotion[title]</b>", iif($promotion['type']==1, $vbphrase['primary_usergroup'], $vbphrase['additional_usergroups']), $type, iif($promotion['strategy'] != 32, $promotion['reputation'], 'N/A'), iif($promotion['strategy'] != 32, $promotion['date'], 'N/A'), iif($promotion['strategy'] != 32, $promotion['posts'], 'N/A'), construct_link_code($vbphrase['edit'], "usergroup.php?" . $vbulletin->session->vars['sessionurl'] . "userpromotionid=$promotion[userpromotionid]&do=updatepromotion" . ($vbulletin->GPC['returnug'] ? '&returnug=1' : '')) . construct_link_code($vbphrase['delete'], "usergroup.php?" . $vbulletin->session->vars['sessionurl'] . "userpromotionid=$promotion[userpromotionid]&do=removepromotion" . ($vbulletin->GPC['returnug'] ? '&returnug=1' : '')), )); Code:
$promotionarray = array( 32=> 'Age >= 18', 17=> $vbphrase['posts'], 18=> $vbphrase['join_date'], 16=> $vbphrase['reputation'], |
Благодарность от: | ||
AzzazelCyC |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|