I was making a plugin which can count threads of user from a specific fid.
PHP Code:
$query = $db->query("SELECT `uid`,`fid` FROM ".TABLE_PREFIX."threads WHERE uid='". $uid ."' AND fid='".$mybb->settings['resourcecount_fidcount']."' ");
The code above can get the user thread only from one fid like I go to setting and write 2, it'll count threads of the user only from 2 and when I write 2,3 it doesn't count from fid 2,3. One way is to use (fid="4" OR fid="2") but I don't know how to make this stuff work with the setting . I want to make a setting which can count threads from several fid.
Current setting i use
PHP Code:
$setting_res = array(
'name'=> 'resourcecount',
'title'=> 'Resource Count',
'description'=> "Custom Resource count plugin settings",
'disporder'=> '1',
'isdefault'=> 'no'
);
$db->insert_query('settinggroups', $setting_res);
$fid = $db->insert_id();
$resourcecount_setting = array(
'name'=> 'resourcecount_fidcount',
'title'=> "Count FID",
'description'=> "any one forum id you want to count user resource from",
'optionscode'=> 'text',
'value'=> '2',
'disporder'=> '1',
'gid'=> intval($fid)
);
$db->insert_query('settings', $resourcecount_setting);
Thanks
Bumping. Where are all those experts
Bumperinho! Is someone here to help me :'(