MyBB-Plugins Forums

Full Version: NewPoints 1.9.9
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Okay. It runs. But i have an other problem.

I wanna add the Points into the header.
So I edited the Template
Quote:header_welcomeblock_member

and include
Quote:{$currency} :{$points}


But the Points, a user has, arent shown!
(01-03-2011, 01:44 AM)Rotstift Wrote: [ -> ]Okay. It runs. But i have an other problem.

I wanna add the Points into the header.
So I edited the Template
Quote:header_welcomeblock_member

and include
Quote:{$currency} :{$points}


But the Points, a user has, arent shown!

Well hmm, where did you get the idea that {$currency} would show the currency and that {$points} would show the points?

Please do a bit of search here, I've posted how to do it already.
Please can someone help me move the NewPoints Points from the author_info_right.

At the moment its like this.
[attachment=684]

How do I change it so that Awards are on th bottom, and not the Points or MyItems are around mid-way.

Ive had a look in the templates, but cant find anything.

Thanks
I doubt that possible since the awards code is probably in the postbit_author_user template
(12-04-2010, 11:15 PM)Pirata Nervo Wrote: [ -> ]
(12-04-2010, 12:07 PM)mazin Wrote: [ -> ]hi every one... thanks for this Great Job ...
i have a question i am new with these Wink
,,,,,,,,,,,,,,,,
Q: if i use for my forum, what happing to our users ? is that any thing to give them a point ? or them must start from 0 like a new user for this system ?

You can use the Maintenance page to calculate all current points.


(12-04-2010, 09:59 PM)karlim Wrote: [ -> ]MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1101 - BLOB/TEXT column 'type' can't have a default value
Query:
CREATE TABLE `mybb_newpoints_settings` ( `sid` int(10) UNSIGNED NOT NULL auto_increment, `plugin` varchar(100) NOT NULL default '', `name` varchar(100) NOT NULL default '', `title` varchar(100) NOT NULL default '', `description` text NOT NULL, `type` text NOT NULL default '', `value` text NOT NULL default '', `disporder` smallint(5) UNSIGNED NOT NULL default '0', PRIMARY KEY (`sid`) ) TYPE=MyISAM

Oops my bad.

In the plugin file, please use this:
PHP Code:
      `descriptiontext NOT NULL,
      `
typetext NOT NULL,
      `
valuetext NOT NULL

Instead of:
PHP Code:
      `descriptiontext NOT NULL,
      `
typetext NOT NULL default '',
      `
valuetext NOT NULL default ''

I fixed this, but now I get

Quote:MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1366 - Incorrect integer value: '' for column 'gid' at row 1
Query:
INSERT INTO mybb2_settings (`name`,`title`,`description`,`optionscode`,`value`,`disporder`,`gid`) VALUES ('newpoints_main_enabled','Is NewPoints enabled?','Set to no if you want to disable NewPoints.','yesno','1','1','')

Appears to be triggered by a call to newpoints_add_setting

PHP Code:
function newpoints_add_setting($name$plugin$title$description$type$value ''$disporder 0)
{
    global 
$db;
    
    if (
$name == '' || $plugin == '' || $title == '' || $description == '' || $type == '')
        return 
false;
    
    
$setting = array(
        
"name"            => $db->escape_string($name),
        
"plugin"        => $db->escape_string($plugin),
        
"title"            => $db->escape_string($title),
        
"description"    => $db->escape_string($description),
        
"type"            => $db->escape_string($type),
        
"value"            => $db->escape_string($value),
        
"disporder"        => intval($disporder)
    );
    
$db->insert_query("newpoints_settings"$setting);
    
    
$setting = array(
        
"name"            => $db->escape_string($name),
        
"title"            => $db->escape_string($title),
        
"description"    => $db->escape_string($description),
        
"optionscode"    => $db->escape_string($type),
        
"value"            => $db->escape_string($value),
        
"disporder"        => intval($disporder),
        
"gid"            => ''
    
);
    
$db->insert_query("settings"$setting);


gid clearly is supposed to be an integer, (as everything in the database ranges to 1-21). I'm new to mybb, so I have no idea what its supposed to be. I figure its supposed to automatically find the right value, but for whatever reason isn't working properly but if you have any ideas as to why that would be great =)
Just remove all entries that set the gid to NULL
Something like "gid" => NULL, and well as for sid (the comma is actually there)
NewPoints randomly reset today.

Everything lost and i had to reinstall.

It was random because non of the settings returned to defaults, all of the rewards for actions when to 0.

Ive had to set it all back up again -.-
(01-13-2011, 06:12 AM)BleepyEvans Wrote: [ -> ]NewPoints randomly reset today.

Everything lost and i had to reinstall.

It was random because non of the settings returned to defaults, all of the rewards for actions when to 0.

Ive had to set it all back up again -.-

Things don't reset themselves but since you're not the first one to ask, do you have the NewPoints backup task enabled?

Was it only the settings or something else too? Did you install any plugins?
I love this points system I have the main plugins installed e.g lottery, bank, shop and they all work great together.
Great to know that! Smile