2012-07-21, 12:16 AM
MyBB Support,
Alright. I've been looking through my DB to find the referred users, so I could
make a link back to it on the UserCP (so users could view who they referred).
However, in the user's table it only has "referred" and then a number (the number of referrals).
But, if you go to the admin panel, click on a user and then the options tab
it says "show referred members". I went to the
/admin/modules/users.php and looked through that file's source code. And
I found this: (the only thing I could find on the referrals)
And I didn't see any SQL statements in that either.
So end point how are you calling the statement and getting which user
referred X users? And how can I replicate this, so I can implement into my
own board? (You don't have to actually do it for me, just point in the right
direction).
-Viral.
Well, I'd like to put this to the top. If someone could please take the time to look through this
and answer?
-Viral.
Alright. I've been looking through my DB to find the referred users, so I could
make a link back to it on the UserCP (so users could view who they referred).
However, in the user's table it only has "referred" and then a number (the number of referrals).
But, if you go to the admin panel, click on a user and then the options tab
it says "show referred members". I went to the
/admin/modules/users.php and looked through that file's source code. And
I found this: (the only thing I could find on the referrals)
if($mybb->input['action'] == "referrers")
{
$plugins->run_hooks("admin_user_users_referrers");
$page->add_breadcrumb_item($lang->show_referrers);
$page->output_header($lang->show_referrers);
$sub_tabs['referrers'] = array(
'title' => $lang->show_referrers,
'link' => "index.php?module=user-users&action=referrers&uid={$mybb->input['uid']}",
'description' => $lang->show_referrers_desc
);
$page->output_nav_tabs($sub_tabs, 'referrers');
$admin_view['conditions']['referrer'] = $mybb->input['uid'];
if(isset($view['conditions']['referrer'])){
$view['url'] .= "&action=referrers&uid=".htmlspecialchars($view['conditions']['referrer']);
}
$popup->add_item($lang->show_referred_users, "index.php?module=user-users&action=referrers&uid={$user['uid']}");
And I didn't see any SQL statements in that either.
So end point how are you calling the statement and getting which user
referred X users? And how can I replicate this, so I can implement into my
own board? (You don't have to actually do it for me, just point in the right
direction).
-Viral.
Well, I'd like to put this to the top. If someone could please take the time to look through this
and answer?
-Viral.