[high]How To Add Extra (Non-Dynamic) Pages With vBindex 3.0.0 RC3 or above.[/high]
This feature that allows you to easily add your own PHP to the extra pages (not custom blocks at present).
Lets say you wanted a top ten posters page:
Add a template called
vbindex_extra_top10 with the folloing HTML:
HTML Code:
<table cellpadding="0" cellspacing="0" border="0" class="tborder" width="100%">
<tr>
<td>
<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr>
<td class="tcat">
<div>Top 10 Core Forums Posters - PHP Driven vBindex Extra Pages Example</div>
</td>
</tr>
<tr>
<td class="alt1">
<div>
$php_output
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br />
This is the main HTML for the content area on the page. Now create a template called
vbindex_extra_php_top10 this will contain the raw PHP code, just as if it was a PHP file. (
NOTE: Upon saving this template you WILL get an error, ignore it and press continue. RC4 will contain instructions to prevent this). Add the following code to it:
PHP Code:
$users = $DB_site->query("SELECT username, userid, posts FROM ".TABLE_PREFIX."user ORDER BY posts DESC LIMIT 10");
while($user = $DB_site->fetch_array($users)) {
echo '<div><a href="'.$vboptions['bburl'].'/member.php?userid='.$user['userid'].'">'.$user['username'].'</a> ('.$user['posts'].')</div>';
}
Note that you need to echo the content out.
Then visit
vbindex.php?section=top10 and you should see a list of the top 10 posters on your forum. Take alook at our demo here:
http://www.coreforums.net/index.core?section=top10