The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
converting to vb3
i am trying to convert this backwards, to vB3.
Code:
if (!$threadinfo['threadid'] OR $threadinfo['isdeleted'] OR (!$threadinfo['visible'] AND !can_moderate($threadinfo['forumid'], 'canmoderateposts'))) { eval(standard_error(fetch_error('invalidid', $vbphrase['thread'], $vbulletin->options['contactuslink']))); } ($hook = vBulletinHook::fetch_hook('misc_whoposted_start')) ? eval($hook) : false; $posts = $db->query_read_slave(" SELECT COUNT(postid) AS posts, post.username AS postuser,user.userid,user.username FROM " . TABLE_PREFIX . "post AS post LEFT JOIN " . TABLE_PREFIX . "user AS user USING(userid) WHERE threadid = $threadinfo[threadid] AND visible = 1 GROUP BY userid ORDER BY posts DESC "); $totalposts = 0; $posters = ''; if ($db->num_rows($posts)) { require_once(DIR . '/includes/functions_bigthree.php'); while ($post = $db->fetch_array($posts)) { // hide users in Coventry $ast = ''; if (in_coventry($post['userid']) AND !can_moderate($threadinfo['forumid'])) { continue; } exec_switch_bg(); if ($post['username'] == '') { $post['username'] = $post['postuser']; } $post['username'] .= $ast; $totalposts += $post['posts']; $post['posts'] = vb_number_format($post['posts']); $show['memberlink'] = iif ($post['userid'], true, false); $templater = vB_Template::create('showthreadwhoposted'); $templater->register('bgclass', $bgclass); $templater->register('post', $post); $templater->register('threadinfo', $threadinfo); $posters .= $templater->render(); } $totalposts = vb_number_format($totalposts); ($hook = vBulletinHook::fetch_hook('misc_whoposted_complete')) ? eval($hook) : false; $templater->register_page_templates(); $templater->register('posters', $posters); $templater->register('threadinfo', $threadinfo); $templater->register('totalposts', $totalposts); vB_Template::preRegister('SHOWTHREAD', array('posters' => $posters)); } just looking at it, the only part that really catches my eye that would need to be changed is Code:
vB_Template::preRegister('SHOWTHREAD', array('posters' => $posters)); |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|