Hey there, I'm a new admin on Gamingforce (whose head admin did the original code for this mod, apparently), and I came across this thread while looking to *ahem* re-implement this feature on our forums -- so thanks for your work on the port
I'm using the hook location
showthread_query_postids instead of showthread_post_start, and the plugin code is as follows:
PHP Code:
$onlybyuserid = trim($_GET['onlybyuserid']);
$onlybyuserid = ($onlybyuserid + 1); // Security
$onlybyuserid = ($onlybyuserid - 1); // Security
if ($onlybyuserid > 0) {
$hook_query_where = "AND post.userid = '$onlybyuserid'";
$highlightwords .= "&onlybyuserid=$onlybyuserid";
}
With this,
no changes to showthread.php are needed. And yes, I'm hijacking the $highlightwords variable
Tested it and it seems to work fine. This is my first time working with hooks and plugins, so please bear with me if there are any mistakes.