MyBB Community Forums

Full Version: ThankYou 3.0.7 Find All Thanked Posts
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
TechMIX' fix does work, but he missed one additional line of code.

Apply his first edit, but for the second, find these 2 lines of code:

$where_sql .= " AND NOT p.thx='0'";
$searcharray["querycache"] = $db->escape_string($where_sql);

and replace with:

$where_sql .= "AND NOT thx='0'";
$query = $db->simple_select("posts", "pid", "{$where_sql}", $options);
        $pids = "";
        $comma = "";
        while($pid = $db->fetch_field($query, "pid"))
{
    $pids .= $comma.$pid;
    $comma = ",";
}
$searcharray["posts"] = $db->escape_string($pids);

Then the search will find only thanked posts and work perfectly! Wink
Thank you.
great works like a charm.. i didnt notice the miss query code.. lol
Big Grin
How I can count all thanks received or given and display this number in the profile of each member?
Thanks.
Pages: 1 2