Customization > Blocks and Modifications
Paid Subscription Status
tanks:
Hello fellas
First i want to thank you for this nice portal software.
I was unable to start a new topic in the correct forum so i will start it here and then you can move my topic.
On my forum i have Paid subscriptions and i like to show members if their subscription is active or not. With this code i can show it on the front page. Notice my member group for subscribers is 12. Yours might be a different ID so change it to suit your forum.
On my forum Paid Subscription are called Partnerships. You can also change this to suit your needs.
Cheers,
Tanks
--- Code: ---global $user_info, $scripturl;
if (in_array(12, $user_info['groups']))
{
echo '<b>Partnership: <font color="green">Active</font></b><br />';
}
else
{
echo '<b>Partnership: <font color="red">Inactive</font></b><br /><a href="' . $scripturl . '?action=profile;area=subscriptions">Join Partnership</a>';
}
--- End code ---
Examples:
Or
Blue:
Hi Tanks,
It's a really nice mod. But, you can replace this:
--- Code: ---<a href="http://www.YOURSITE.com/index.php?action=profile;area=subscriptions">
--- End code ---
to this:
--- Code: ---<a href="' . $scripturl . '?action=profile;area=subscriptions">
--- End code ---
and
--- Code: ---global $user_info;
--- End code ---
to:
--- Code: ---global $user_info, $scripturl;
--- End code ---
Doing this, members don't need to change the url ;) They only need to change the id of the membergroup.
Great block and Congrats ;)
tanks:
I Updated the code - Thanks.
It's a code i got from back in the days when i was using TP.
Nathaniel:
Moved to the Blocks and Modifications board. Sorry about the wait.
Looks good. :D
qtime:
Great code, is it possible to show the end date of the subscription?
Navigation
[0] Message Index
[#] Next page
Go to full version