Latest Register Log In

+ Advanced Search

Sponsorship Template Variables

Sponsorship Template Variables
08/22/11 (Edited 11/17/18)

The default 'submit article' 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 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:
<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 article type sponsorship there are additional template variables available in specific locations, such ase the submit article page and the article sponsorship page. See for the list of those template variables.

Description Calling information about sponsorships into your templates.
Views 363 views. Averaging 0 views per day.