< Back to Template Variables

Sponsorship Template Variables

The default 'submit article' template uses this code to display the sponsorship information to your visitors:
<ul>
<!-- BEGIN SPONSORED LIST -->
<li>{TYPENAME} costs {LANG_GENERAL_CURRENCY}{PRICE} for {DURATION} days.</li>
<!-- END SPONSORED LIST -->
</ul>


Sometimes, however, you need more a more flexible display or you need to display it somewhere other than the 'submit article' 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 article type or a usergroup number.
{SPONSORDATAGETDURATIONBYTYPE[typename]} -- Displays the sponsorship duration (in days) for the given typename, which can be a article type or a usergroup number.
{SPONSORDATATYPEISSPONSORED[typename]} -- Returns true if the given article type or usergroup number is a sponsored type, or false otherwise.
{SPONSORDATEGETPRICEPERFORQUANTITY[typename <,> quantity]} -- For bulk sponsorship, gives the price per article for the given article 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 article 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:
<IF {THISMEMBERBULKPURCHASEDTOTAL} and {THISMEMBERBULKPURCHASEDREMAINING}>
<p>You can make {THISMEMBERBULKPURCHASEDREMAINING} more {THISMEMBERBULKPURCHASEDTYPE} submissions: <a href="suggest.php?action=addlink">Submit</a></p>
<ELSE IF {THISMEMBERBULKPURCHASEDTOTAL}>
<p>You've used up all your bulk submissions: <a href="index.php?action=bulksponsor">Buy More</a></p>
<ELSE>
<p>You haven't purchased any submissions: <a href="index.php?action=bulksponsor">Buy Some</a></p>
</IF>


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