Hi, Im searching for a plugin developer or someone who knows how to use querys for a request.
On member profile I need to show the numer of threads from a specific forum the user has done.
An ugly and fast example. On user's profile:
Where 12 is the total of the user's threads on forum [fid]=2&3
13 the total
of the user's threads on forum [fid]=4&5
And when I click on them, i'll show the search page of the threads, like just this
If someone can do this, I need an estimate cost for the plugin.
I would like to have something similar for the profil.
I would like to list all userthreads from a specific forum.
Is that possible?
(2020-01-22, 04:23 AM)skrilaxrev Wrote: [ -> ]I would like to have something similar for the profil.
I would like to list all userthreads from a specific forum.
Is that possible?
How and where do you want to display this?
In the profile the next information about threads is useless I think.
We have something like this on our forum...but we list threads with a specific thread prefix.
[
attachment=42491]
(2020-01-22, 05:11 PM)Salvation Wrote: [ -> ] (2020-01-22, 04:23 AM)skrilaxrev Wrote: [ -> ]I would like to have something similar for the profil.
I would like to list all userthreads from a specific forum.
Is that possible?
How and where do you want to display this?
In the profile the next information about threads is useless I think.
I think what they mean is on the user profile the user threads's from a X forum can be visible in the same way all posts and treads list are seen... and that's what i'm searching for.
As far I can figure is basically the list threads but with a conditional where forum['fid']==XYZ. Something like... this?
elseif($mybb->input['action'] == "finduserthreads2")
{
$where_sql = "uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'";
// Check group permissions if we can't view threads not started by us
$group_permissions = forum_permissions();
foreach($group_permissions as $fid => $forum_permissions)
{
if(isset($forum_permissions['canonlyviewownthreads']) && $forum_permissions['canonlyviewownthreads'] == 1)
{
$onlyusfids[] = $fid;
}
}
if(!empty($onlyusfids))
{
$where_sql .= "AND ((fid IN(".implode(',', $onlyusfids).") AND uid='{$mybb->user['uid']}') AND fid IN ('1,2,3')";
}
$tids = '';
$comma = '';
$query = $db->simple_select("threads", "tid", $where_sql);
while($tid = $db->fetch_field($query, "tid"))
{
$tids .= $comma.$tid;
$comma = ',';
}
$sid = md5(uniqid(microtime(), true));
$searcharray = array(
"sid" => $db->escape_string($sid),
"uid" => $mybb->user['uid'],
"dateline" => TIME_NOW,
"ipaddress" => $db->escape_binary($session->packedip),
"threads" => $db->escape_string($tids),
"posts" => '',
"resulttype" => "threads",
"querycache" => $db->escape_string($where_sql),
"keywords" => ''
);
$plugins->run_hooks("search_do_search_process");
$db->insert_query("searchlog", $searcharray);
redirect("search.php?action=results&sid=".$sid, $lang->redirect_searchresults);
}
I haven't proved yet but I don't know if this can give a more consice idea about how to do this