Version: 2.0, by kall
Developer Last Online: Aug 2021
Version: 3.0.7
Rating:
Released: 04-18-2005
Last Update: 05-05-2005
Installs: 10
No support by the author.
Hack Name: Subscription Expiry Notification on Forumhome
Hack Version: 2.1
Hack Author: Kall
Release: 20 April 2005
Description: Shows date of Subscription Expiry (and days remaining) on Forumhome to members with Active Subscriptions.
Requested by: Mike Warner.
Thanks to: MarcoH64 (big thanks to Marco), Mike Warner and The_Realist for help on day one ironing out the bugs.
By default, this will show to people with under 30 days remaining on their Subscription and the next 5 subscriptions to expire.
To change the days, change the 30 at the start of the last PHP edit to the number of days you want to show in advance.
To change the number, change the 5 at the end of the sql query.
This is my first hack that includes either a joining of tables or a new template or a template that can be called more than once, so I apologise in advance if a string of runaway queries turns your server into swiss cheese.
New features in v2.1: Optimised query to only be run for non-guests and tidied up a lot. (thanks to Marco). To upgrade, simply replace the final index.php edit with the one inside the new .txt file.
Updates - Fixed query thanks to MarcoH64.
Extended message thanks to The_Realist.
Tidied message up, XHTML-wise and gave it a nice little box.
v2.0 Released. Thanks to MarcoH64 for shaming me into making it a bit more functional with his first post.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Sorry but if i look at your code, i think you are missing some things:
- If someone have no subscription, it will show a negative days remaining and an end date of 1-1-1970
- If someone have more then 1 subscription, it will only show info for 1 (and this don't need to be the oldest)
- It also runs for guests.
Sorry but if i look at your code, i think you are missing some things:
- If someone have no subscription, it will show a negative days remaining and an end date of 1-1-1970
- If someone have more then 1 subscription, it will only show info for 1 (and this don't need to be the oldest)
- It also runs for guests.
d'oh!
OK, this should work better:
HTML Code:
<if condition="$remaining < 20 AND $expirydate != '1-Jan-1970' AND $bbuserinfo[userid] != '0'"><div align="center">Your Subscription Expires on $expirydate. You have $remaining days Remaining.<br />Click <a href="$vboptions[bburl]/subscriptions.php" title="Renew Subscription">here</a> to renew.</div></if>
Tested but it still says for none subscribed members:
Your Subscription Expires on 01-01-1970. You have -12892.89 days Remaining.
Click here to renew.
Quote:
Originally Posted by kall
d'oh!
OK, this should work better:
HTML Code:
<if condition="$remaining < 20 AND $expirydate != '1-Jan-1970' AND $bbuserinfo[userid] != '0'"><div align="center">Your Subscription Expires on $expirydate. You have $remaining days Remaining.<br />Click <a href="$vboptions[bburl]/subscriptions.php" title="Renew Subscription">here</a> to renew.</div></if>