Hello :)
Wondering how would i have a group promoted when x amount of + rep has been received?
Don't know why its not already a feature, but sure would be handy to have.
Been searching through files and see the admin/applications/members/modules_admin/groups/groups.php
//-----------------------------------------
// Can't promote to non-existent group
//-----------------------------------------
foreach( $this->cache->getCache('group_cache') as $row )
{
$promotion = explode( '&', $row['g_promotion'] );
if( $promotion[0] == $this->request['id'] )
{
$this->DB->update( 'groups', array( 'g_promotion' => '-1&-1' ), 'g_id=' . $row['g_id'] );
}
}
//-----------------------------------------
// Some other generic fields
//-----------------------------------------
$promotion_a = '-1'; // id
$promotion_b = '-1'; // posts
if ( $this->request['g_promotion_id'] AND $this->request['g_promotion_id'] > 0 )
{
$promotion_a = $this->request['g_promotion_id'];
$promotion_b = $this->request['g_promotion_posts'];
}
'g_promotion' => $promotion_a . '&' . $promotion_b,
and in /admin/applications/members/skin_cp/cp_skin_groups.php
//-----------------------------------------
// Format some of the data
//-----------------------------------------
list($group['g_promotion_id'], $group['g_promotion_posts']) = explode( '&', $group['g_promotion'] );
list($p_max, $p_width, $p_height) = explode( ":", $group['g_photo_max_vars'] );
list( $limit, $flood ) = explode( ":", $group['g_email_limit'] );
if ($group['g_promotion_posts'] < 1)
{
$group['g_promotion_posts'] = '';
}
$form['g_promotion_id'] = $this->registry->output->formDropdown( "g_promotion_id", $all_groups, $group['g_promotion_id'] );
$form['g_promotion_posts'] = $this->registry->output->formSimpleInput( 'g_promotion_posts', $group['g_promotion_posts'] );
$form['gbw_promote_unit_type'] = $this->registry->output->formDropdown( "gbw_promote_unit_type", $gbw_unit_type, $group['gbw_promote_unit_type'] );
<tr class='guest_legend'>
<th colspan='2'>{$this->lang->words['gt_promotion']}</th>
</tr>
<tr class='guest_legend'>
<td>
<label>{$this->lang->words['g_mpromote']}</label><br />
{$guest_legend}
<span class='desctext'>{$this->registry->output->javascriptHelpLink('mg_promote')}</span>
</td>
<td>
HTML;
if( $group['g_access_cp'] )
{
$IPBHTML .= "{$this->lang->words['g_mpromote_no']}";
}
else
{
$promotegrouptxt = sprintf( $this->lang->words['g_mpromote_to'], $form['g_promotion_id'], $form['g_promotion_posts'], $form['gbw_promote_unit_type'] );
$IPBHTML .= "{$promotegrouptxt}";
}
$IPBHTML .= <<<HTML
</td>
</tr>
That last one must be the promotion part of adminCP group module.
Can anyone help me add reputation to the above? thanks in advance.