< Back to Sponsorship

Sponsorship Template Variables

The default 'submit topic' template uses this code to display the sponsorship information to your visitors:

Sometimes, however, you need more a more flexible display or you need to display it somewhere other than the 'submit topic' page. For this purpose, some sponsorship template variables have been provided which will work in any template (including the wrapper):

{SPONSORDATAGETCHARGEBYTYPE[typename]} -- Displays the price for the given typename, which can be a topic type or a usergroup number.
{SPONSORDATAGETDURATIONBYTYPE[typename]} -- Displays the sponsorship duration (in days) for the given typename, which can be a topic type or a usergroup number.
{SPONSORDATATYPEISSPONSORED[typename]} -- Returns true if the given topic type or usergroup number is a sponsored type, or false otherwise.
{SPONSORDATEGETPRICEPERFORQUANTITY[typename <,> quantity]} -- For bulk sponsorship, gives the price per topic for the given topic type and quantity.

You can also get info about bulk sponsorship purchases by a member:
{MEMBERBULKPURCHASEDTOTAL} - The number of submissions they bulk purchased.
{MEMBERBULKPURCHASEDUSED} - The number of bulk purchased submissions they've done so far.
{MEMBERBULKPURCHASEDREMAINING} - The number of bulk purchased submissions they have left.
{MEMBERBULKPURCHASEDTYPE} - The topic type they've bulk purchased.

These also work as {THISMEMBER for the person viewing the page, so to show them the number of submissions they have left you'd do this:
<p>You can make {THISMEMBERBULKPURCHASEDREMAINING} more {THISMEMBERBULKPURCHASEDTYPE} submissions: <a href="suggest.php?action=addlink">Submit</a></p>
<p>You've used up all your bulk submissions: <a href="index.php?action=bulksponsor">Buy More</a></p>
<p>You haven't purchased any submissions: <a href="index.php?action=bulksponsor">Buy Some</a></p>

For topic type sponsorship there are additional template variables available in specific locations, such ase the submit topic page and the topic sponsorship page. See scripts.webmastersite.net/...g-type-sponsorship-21.html for the list of those template variables.