Hello There, Guest! › Register

MySubscriptions 2.2 released.
Looking for a custom plugin for your site? Ask here for a quote.

External point scoring...
#1

Hi, I'm new to MyBB and NewPoints plugins. I wanted to know if it's possible to allow forum users to score points outside of the forum.

I'm currently using the MyBB login system for my entire website (http://www.ww-c.netii.net), and I want to be able to award points to users for completing different actions throughout the site.
Reply
#2

Did you look at the development.html file? It contains almost all functions provided by NewPoints, you may want to take a look at it since it explains what each function does.

If you have any question about any function, feel free to ask Smile
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
Reply
#3

Okay, a couple of questions.
1) Would I need to make a plugin, or is there a PHP file I can include on pages that would award points?
2) I see that I'll need to use the newpoints_addpoints() function, but what are the forum/group income rate parameters for?
Reply
#4

Forum rules and Group rules are two features that come with NewPoints.
You can find the Forum rules in the NewPoints ACP page as well as the Group rules.

The parameter forum income rate should be set to 0 since it should be used only when you're doing something inside a certain forum. (e.g. you want people to receive 2x more when they post in a news forum or you want people to receive no points when they post in the chat forum)

The parameter group income rate should be set the to the group income rate - which is set in the NewPoints -> Group Rules Admin CP page.

Example:
PHP Code:
// check group rules - primary group check
$grouprules newpoints_getrules('group'$mybb->user['usergroup']);
if (!
$grouprules)
    
$grouprules['rate'] = 1// no rule set so default income rate is 1

// give points to the user
newpoints_addpoints($mybb->user['uid'], 1000$grouprules['rate']); 

The rate will be multiplied by the amount of points which is 100 in this case.

Anymore questions? By the way, you do not need a plugin to this, but you must make sure the NewPoints plugin is running.
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
Reply
#5

Okay, I've got it to work on a page, with it adding/removing points as required.

What I'd like to know now is if it's possible to add extra information to the NewPoints home page (<forum>/newpoints.php), so that I can detail how I'm going to award points for other things throughout my site.

Is there some kind of template system, like in MyBB, for editing certain aspects?

Edit (1): I've found the templates in the Global section, and after looking in the newpoints_home template, it seems that the one I need to edit is newpoints_home_desc. But that's under $lang - where do I find that?
Edit (2): found it! Should be alright now. Wink
Reply
#6

I'm glad you got it working Smile
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
Reply




Users browsing this thread: 1 Guest(s)