PDA

View Full Version : How can i show paid subscription expire day time left on header?


JesWhite
02-04-2017, 08:38 AM
hi...
i want to add expire day on header template..

but i tried to add {vb:raw enddate} but not worked.


there is this code on subscription template

<vb:if condition="$show['activesubscriptions']">
<div class="block" id="activesubs">
<h2 class="blockhead">{vb:rawphrase active_subscriptions}</h2>
<div class="blockbody">
<ol>
{vb:raw subscribedbits}
</ol>
</div>
</div>
</vb:if>


i added {vb:raw subscribedbits} this code but not worked on header..

how can i workable {vb:raw subscribedbits} this code..?


thanks for helps...

JesWhite
02-11-2017, 10:40 AM
is there any way?

cellarius
02-11-2017, 12:17 PM
You can't just move variables around like that. That information is not available in header template, or on any page in vB, for that matter.

Not an easy way by simple template edit. You need to add php code to a plugin to find out if the current user has any active subscriptions, if so, which ones, get the expiry dates, and register that information for the header template. If you have more than one subscriptions, you need to decide which one to show, or show them all.

JesWhite
02-25-2017, 04:20 AM
You can't just move variables around like that. That information is not available in header template, or on any page in vB, for that matter.

Not an easy way by simple template edit. You need to add php code to a plugin to find out if the current user has any active subscriptions, if so, which ones, get the expiry dates, and register that information for the header template. If you have more than one subscriptions, you need to decide which one to show, or show them all.
ok i understood.
maybe someone create a plugin for this option.

cellarius
02-25-2017, 10:39 AM
If you have some coding skills this addon of mine might give you an idea of what to do:
https://vborg.vbsupport.ru/showthread.php?t=228095

Or it may even cover your needs, although there is no option for the header.