Jump to content
DevFuse Forums

Donation Tracker - Add secondary group vs replace


mckooter

Recommended Posts

I have had experience with the donation tracker on a previous project I had, and in testing I think this was the case:

 

Is it possible to setup rewards so it adds a secondary group to a user but does not replace or remove any existing secondary groups?

 

There are far too many combinations on my current setup to have to deal with dissapearing secondary groups. 

 

thanks,

Link to comment
Share on other sites

  • Management

Currently this is a known "bug", where it replaces the secondary groups rather then add to them. I have worked on this before and do have some test code to correct this if needed but it hasn't seen a widespread release yet. With IPB4 just around the corner, this is unlikely to be included by default in the IPB 3.4.x series either.

Link to comment
Share on other sites

Hey,

 

if we do buy it any chance you could dig up the rough code and toss it to me? I doubt id need much other than general direction and where you think its wrong, i may be able to see it myself but hard to say without seeing the code :D

Link to comment
Share on other sites

  • Management

Hey,

 

if we do buy it any chance you could dig up the rough code and toss it to me? I doubt id need much other than general direction and where you think its wrong, i may be able to see it myself but hard to say without seeing the code :D

Sure, I've had a few people use it but not much testing apart from that.

 

Open admin/applications_addon/other/donate/sources/functions.php

 

Find:

# Workout promotion time

Add ABOVE:

# Combine existing secondary groups and new ones.
if( $reward['promote_secondary'] != $donateMember['mgroup_others'] )
{
$reward['promote_secondary'] = array_merge( explode( ',', $reward['promote_secondary'] ), explode( ',', $donateMember['mgroup_others'] ) );

$reward['promote_secondary'] = IPSText::cleanPermString( implode( ',', $reward['promote_secondary'] ) );
}

Save.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...