I am creating a custom mod for my site, at the moment i have done this and only get a white page displayed, but at least the result appears. I am not sure what example to follow so that the rest of the showthread template appears too?
Plugin:
Product: vBulletin
Hook Location: showthread_post_start
Title: galleryimagedisplay
Execution Order: 5
PHP Code:
Code:
$result = $db->query_first("SELECT * FROM dbtech_gallery_images WHERE roll_id = '$threadid'");
$id = $result[imageid];
$title = $result[title];
$templater = vB_Template::create('test');
$templater->register('id', $id);
$templater->register('title', $title);
$templatevalues['my_insertvar'] = $templater->render();
vB_Template::preRegister('SHOWTHREAD', $templatevalues);
This is my template:
Code:
{vb:raw id} {vb:raw title}
Edit: Got the above displaying ok now.