The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
Hi,
I would like to make the below plugin for vbulletin 4.1.2, can anybody tell me what to change in the code and what to use in the template instead of ($threadlist) to use the below plugin: HTML Code:
$threadlist='';
$last_threads = $vbulletin->db->query("SELECT DISTINCT(threadid), title FROM " . TABLE_PREFIX . "thread ORDER BY rand() LIMIT 0,12");
while ($mthreads = $vbulletin->db->fetch_array($last_threads))
{
$threadlist.= "<a href=\"showthread.php?t=$mthreads[threadid]\">".fetch_trimmed_title($mthreads[title])."</a><br />";
}
|
|
#2
|
||||
|
||||
|
Not tested, but I don't think you'll have to change the code. At first glance I see nothing that would not work with vB4.
You just need to register the variable $threadlist for any template you want to use it in. Example for FORUMHOME: PHP Code:
HTML Code:
{vb:var threadlist}
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|