Skip to content

Instantly share code, notes, and snippets.

View tommm's full-sized avatar

Tom Moore tommm

  • Carlisle, England
View GitHub Profile
@tommm
tommm / mybb_get-unique-uids.txt
Created July 13, 2017 15:56
MyBB: Get unique UIDS from posts on a specific page
$plugins->add_hook('showthread_start', 'plugin_showthread_start');
$plugins->add_hook('showthread_end', 'plugin_showthread_end');
$plugins->add_hook('postbit', 'plugin_postbit');
function plugin_showthread_start()
{
global $unique_uids;
$unique_uids = [];
// Other showthread_start code
@tommm
tommm / mybb_get-pmid.txt
Created October 22, 2012 14:40
MyBB: Get recipients and their respective PMIDs
$plugins->add_hook('datahandler_pm_insert', 'pm_insert');
$plugins->add_hook('private_do_send_end', 'pm_private_end');
function pm_insert($handler)
{
global $cache;
static $last_uid;
if(!isset($cache->cache['pmcache']))
{