2017-07-29, 10:11 PM
I tend to stick to theme designing, but thought I'd give plugins a go. At the moment I'm attempting to write an array and just a usual query to the database but not having much luck. The array I'm doing is within plugin activation and it's to create a new group. Is there an easier way to do this? At the moment I've just named the array and gone through the structure of the usergroup table (type, title, description, namestyle etc.) and then used the following to try and write it to the usergroups table:
I'm having a similar problem with the following bit of code too (won't query to database):
Random_reset is a setting created in the plugin activation which produces a yesno option on the settings page. Any possible solutions?
$db->insert_query('usergroups', $random_create_groups);
rebuild_settings();
I'm having a similar problem with the following bit of code too (won't query to database):
// Reset
function random_reset() {
global $db;
if ($mybb->settings['random_reset'] == 1){
$db->write_query("UPDATE TABLE ".TABLE_PREFIX."settings SET value='' WHERE name='random_userbar'");
$db->write_query("UPDATE TABLE ".TABLE_PREFIX."settings SET value='1' WHERE name='random_uid'");
$db->write_query("UPDATE TABLE ".TABLE_PREFIX."settings SET value='0' WHERE name IN('random_enable', 'random_reset')");
rebuild_settings();
}
}
Random_reset is a setting created in the plugin activation which produces a yesno option on the settings page. Any possible solutions?
Plugin Count: I lost count.
Public Plugins are available here.
Please do not PM me for support unless asked to.
Public Plugins are available here.
Please do not PM me for support unless asked to.