Just an update on my removal of the unknown field from the rpg_types table.
If you do this to prevent users from buying items they shouldn't, then you are left with all of the categories upon first going to the itemshop, however they can't be expanded.
This looks messy... so I fixed it.
Simply open itemshop.php
Find (right at the end of the file):
Code:
eval("dooutput(\"".gettemplate("itemshop")."\");");
Replace with:
Code:
if($action=="" && $itemtype < 1) {
eval("dooutput(\"".gettemplate("itemshop_viewfirst")."\");");
} else {
eval("dooutput(\"".gettemplate("itemshop")."\");");
}
Then create a new template called itemshop_viewfirst and insert the following:
Code:
{htmldoctype}
<html>
<head>
$metarefresh
<title>$bbtitle - Itemshop</title>
$headinclude
</head>
<body>
$header
<table cellpadding="2" cellspacing="0" border="0" width="{contenttablewidth}" {tableinvisibleextra} align="center">
<tr>
<td width="100%"><img src="{imagesfolder}/vb_bullet.gif" alt="" border="0" align="absmiddle">
<normalfont><b><a href="index.php?s=$session[sessionhash]">$bbtitle</a> > Itemshop</b></normalfont></td>
</tr>
</table>
<br>
<table cellpadding="{tableouterborderwidth}" cellspacing="0" border="0" bgcolor="{tablebordercolor}" {tableouterextra} width="{contenttablewidth}" align="center"><tr><td>
<table cellpadding="4" cellspacing="{tableinnerborderwidth}" border="0" {tableinnerextra} width="100%">
<tr id="cat">
<td bgcolor="{tableheadbgcolor}" colspan="5"><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td><smallfont color="{tableheadtextcolor}"><b>$bbuserinfo[username]'s Current Status</b></smallfont></td><td align="right"><smallfont color="{tableheadtextcolor}"><b>$points Gold</b></smallfont></td></tr></table></td>
</tr>
</tr>
<tr>
<td bgcolor="{categorybackcolor}" width="5%" align="center"><normalfont color="{categoryfontcolor}"><b>Icon</b></normalfont></td>
<td bgcolor="{categorybackcolor}" width="35%" align="center"><normalfont color="{categoryfontcolor}"><b>Name</b></normalfont></td>
<td bgcolor="{categorybackcolor}" width="50%" align="center"><normalfont color="{categoryfontcolor}"><b>Description</b></normalfont></td>
<td bgcolor="{categorybackcolor}" width="5%" align="center"><normalfont color="{categoryfontcolor}"><b>Cost</b></normalfont></td>
<td bgcolor="{categorybackcolor}" width="5%" align="center"><normalfont color="{categoryfontcolor}"><b>Refund</b></normalfont></td>
</tr>
$loop
$loopp
<tr id="cat">
<td bgcolor="{tableheadbgcolor}" colspan="5"><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td><smallfont color="{tableheadtextcolor}"><b>Bank Deposit: $bankuser[bankval]</b></smallfont></td><td align="right"><smallfont color="{tableheadtextcolor}"><b>Total Bank Property: $banktotal | Total Bank Clients: $clients</b></smallfont></td></tr></table></td>
</tr>
</table>
</td></tr></table>
<br>
<table cellpadding="{tableouterborderwidth}" cellspacing="0" border="0" bgcolor="{tablebordercolor}" {tableouterextra} width="{contenttablewidth}" align="center"><tr><td>
<table cellpadding="4" cellspacing="{tableinnerborderwidth}" border="0" {tableinnerextra} width="100%">
<tr id="cat">
<td bgcolor="{tableheadbgcolor}" colspan="5" align="center" width="33%" align="center"><smallfont color="{tableheadtextcolor}"><b><a href="$PHP_SELF?action=bank">Visit The Bank</a></b></smallfont></td>
<td bgcolor="{tableheadbgcolor}" colspan="5" align="center" width="34%" align="center"><smallfont color="{tableheadtextcolor}"><b>Total Profit: $options[profit] | Total Sold Items: $options[sold]</b></smallfont></td>
<td bgcolor="{tableheadbgcolor}" colspan="5" align="center" width="33%" align="center"><smallfont color="{tableheadtextcolor}"><b><a href="$PHP_SELF?action=buypers">Buy Personal Itemshop</a></b></smallfont>
</td></tr>
<tr id="cat">
<td bgcolor="{tableheadbgcolor}" colspan="5" align="center" width="33%" align="center"><smallfont color="{tableheadtextcolor}"><b><a href="$bburl/store.php">Visit The Traveller's Shop</a></b></smallfont></td>
<td bgcolor="{tableheadbgcolor}" colspan="5" align="center" width="34%" align="center"><smallfont color="{tableheadtextcolor}"><b><a href="$bburl/battle.php">Go To The Battle Arena</a></b></smallfont></td>
<td bgcolor="{tableheadbgcolor}" colspan="5" align="center" width="33%" align="center"><smallfont color="{tableheadtextcolor}"><b><a href="$bburl/heal.php">Visit The Healer</a></b></smallfont>
</td></tr></table>
</td></tr></table>
<br>
<center>$typelinks
<br>
<normalfont>Please choose a class to view the items...</normalfont>
</center>
<br>
<br>
<br>
<br>
<table cellpadding="{tableouterborderwidth}" cellspacing="0" border="0" bgcolor="{tablebordercolor}" {tableouterextra} width="{contenttablewidth}" align="center"><tr><td>
<table cellpadding="4" cellspacing="{tableinnerborderwidth}" border="0" {tableinnerextra} width="100%">
<tr id="cat">
<td bgcolor="{tableheadbgcolor}" colspan="5" align="center" width="100%"><smallfont color="{tableheadtextcolor}"><b>Copyright 2002 <a href="mailto:gheghe@rnc.ro">Mewtwo</a>. <a href="http://ffd.ffrepublic.com">FFDiscovery</a></b></smallfont></td>
</tr>
</table>
</td></tr></table>
<br>
$footer
</body>
</html>
That way the user must select a class before being able to see any items