MyBB-Plugins Forums

Full Version: [Release] Buy Usertitle and Username 1.2
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10
have one problem, the plugin not show here Administrator Panel -> NewPoints -> Plugins.
and i not see how can change the price

EDIT: Problem solved
Love this plugin but wish it had a setting that worked with MyBB Strict Username master
So many thanks buddy this plugin is awesome. I hope it has minimum amount of bugs. Glad to join this forum.
Users reported to me that if they enter a usertitle that is too long, their title wont be changed (which is good), but they still get their points reduced (which is bad).

If they enter an invalid usertitle, no points should be taken away.

Could you fix that or tell me how to fix it? Thanks Smile
Have you tested it yourself? I'm not saying I don't trust your users, I'm saying experience tells me users usually report bugs that are in fact not bugs. And I spent many hours in my life looking at non existing bugs reported by users of my clients' forums.

See below: If they get an error for invalid usertitle, they won't be deducted any points.
PHP Code:
if(!$userhandler->validate_user())
        {
            
$errors $userhandler->get_friendly_errors();
        }
        else
        {
            
$userhandler->update_user();
            
            
// get points from user
            
newpoints_addpoints($mybb->user['uid'], -(floatval($mybb->settings["newpoints_buynametitle_{$field2}_fee"])));
            
            
$plugins->run_hooks("newpoints_buynametitle_success");
            
            if (
$mybb->input['action'] == 'buynametitle_name')
            {
                
$langstring $lang->newpoints_buynametitle_log_name;
            }
            else
            {
                
$langstring $lang->newpoints_buynametitle_log_title;
            }
            
            
$log_message $lang->sprintf($langstring$mybb->user[$field], $userhandler->data[$field]);
            
            
// log purchase
            
newpoints_log('buynametitle_'.$field$log_message);
            
            
redirect($mybb->settings['bburl']."/newpoints.php?action=buynametitle"$lang->newpoints_buynametitle_updated$lang->newpoints_buynametitle_updated_title);
        } 
(02-13-2015, 09:31 PM)Diogo Parrinha Wrote: [ -> ]Have you tested it yourself? I'm not saying I don't trust your users, I'm saying experience tells me users usually report bugs that are in fact not bugs. And I spent many hours in my life looking at non existing bugs reported by users of my clients' forums.

See below: If they get an error for invalid usertitle, they won't be deducted any points.

PHP Code:
if(!$userhandler->validate_user())
        {
            
$errors $userhandler->get_friendly_errors();
        }
        else
        {
            
$userhandler->update_user();
            
            
// get points from user
            
newpoints_addpoints($mybb->user['uid'], -(floatval($mybb->settings["newpoints_buynametitle_{$field2}_fee"])));
            
            
$plugins->run_hooks("newpoints_buynametitle_success");
            
            if (
$mybb->input['action'] == 'buynametitle_name')
            {
                
$langstring $lang->newpoints_buynametitle_log_name;
            }
            else
            {
                
$langstring $lang->newpoints_buynametitle_log_title;
            }
            
            
$log_message $lang->sprintf($langstring$mybb->user[$field], $userhandler->data[$field]);
            
            
// log purchase
            
newpoints_log('buynametitle_'.$field$log_message);
            
            
redirect($mybb->settings['bburl']."/newpoints.php?action=buynametitle"$lang->newpoints_buynametitle_updated$lang->newpoints_buynametitle_updated_title);
        } 

I tested it, and it is indeed as the user reportet. I get the notice about the usertitle being too long, and once I refresh or e.g. open the main page, I have lost the points it would normally cost to buy a usertitle. 
Please make sure you're using v1.2 because that's been fixed in 1.2.
(02-14-2015, 07:37 AM)Diogo Parrinha Wrote: [ -> ]Please make sure you're using v1.2 because that's been fixed in 1.2.

You were right, I still used 1.1, thanks Smile
No problem.
Is this working for 1.8?
Pages: 1 2 3 4 5 6 7 8 9 10