The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#21
|
|||
|
|||
Hopefully this will be my final revision :x
Fixed alignment, and updates every 20minutes. Code:
<?xml version="1.0" encoding="ISO-8859-1"?> <product productid="top5posters" active="1"> <title>Top 5 Posters</title> <description>Gets a string of the top five posters, and parses where $Top5 is included in a template</description> <version>0.1</version> <url /> <versioncheckurl /> <dependencies> </dependencies> <codes> </codes> <templates> </templates> <plugins> <plugin active="1" executionorder="10"> <title>Parse Names</title> <hookname>global_start</hookname> <phpcode><![CDATA[global $vbulletin; $Top5Data = unserialize($vbulletin->TopPosters); if (count($Top5Data) != 2) $Top5Data[0] = 0; $Top5 = $Top5Data[1]; if (($Top5Data[0] + 1200) < TIMENOW) { $GrabString = $vbulletin->db->query_read("select `username`, `posts` from `".TABLE_PREFIX."user` ORDER BY `posts` DESC limit 0, 4;"); while ($GrabTop = $vbulletin->db->fetch_array($GrabString)) { $Top5Store[] = '<tr><td width="100%" style="color:#848484;">'.$GrabTop['username'].'</td><td style="white-space:nowrap; color:#FFFF00" align="right">'.$GrabTop['posts'].'</td></tr>'; } $Top5Store = '<table width="100%" border="0" style="color:#FF0">'.implode('', $Top5Store).'</table>'; htmlspecialchars_uni($Top5Store); $Top5Storage = array(TIMENOW, $Top5Store); build_datastore('TopPosters', serialize($Top5Storage)); $Top5 = $Top5Store; }]]></phpcode> </plugin> <plugin active="1" executionorder="5"> <title>DataStore</title> <hookname>init_startup</hookname> <phpcode><![CDATA[$datastore_fetch[] = "'TopPosters'"; $Top5 = $vbulletin->TopPosters;]]></phpcode> </plugin> </plugins> <phrases> </phrases> <options> </options> <helptopics> </helptopics> <cronentries> </cronentries> <faqentries> </faqentries> </product> |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|