Latest Register Log In

+ Advanced Search

Sponsorship Template Variables

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

The default 'submit listing' 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 listing' 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 listing type or a usergroup number.
{SPONSORDATAGETDURATIONBYTYPE[typename]} -- Displays the sponsorship duration (in days) for the given typename, which can be a listing type or a usergroup number.
{SPONSORDATATYPEISSPONSORED[typename]} -- Returns true if the given listing type or usergroup number is a sponsored type, or false otherwise.
{SPONSORDATEGETPRICEPERFORQUANTITY[typename <,> quantity]} -- For bulk sponsorship, gives the price per listing for the given listing 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 listing 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 listing type sponsorship there are additional template variables available in specific locations, such ase the submit listing page and the listing sponsorship page. See scripts.webmastersite.net/...g-type-sponsorship-21.html for the list of those template variables.




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