Facebook  Twitter 

SMFHacks.com

+- +-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 12375
Latest: scuzzy
New This Month: 2
New This Week: 1
New Today: 1
Stats
Total Posts: 40218
Total Topics: 7083
Most Online Today: 122
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 24
Total: 24

Author Topic: Script that tells the member when his/her membership will expire  (Read 1847 times)

0 Members and 1 Guest are viewing this topic.

Offline shuban

  • Hero Member
  • *****
  • Posts: 657
    • View Profile
    • Homework Clinic - Your Academic Lifeline
Hi,

I would like to show a message in index.template.php that tells the member in how many days their membership will expire. Could you somehow produce a script for me?

I know you have to fetch the expiry date in the database, but I'm really confused... Any thoughts?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 15109
    • View Profile
Re: Script that tells the member when his/her membership will expire
« Reply #1 on: April 17, 2016, 10:18:47 pm »
Stored in store_group_log table
Based on ID_member
ID_GROUPToMove is group to move back to

Uses the date field plus groupexpiredays to get the expire date
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline shuban

  • Hero Member
  • *****
  • Posts: 657
    • View Profile
    • Homework Clinic - Your Academic Lifeline
Re: Script that tells the member when his/her membership will expire
« Reply #2 on: April 17, 2016, 10:25:43 pm »
Thanks, SMFHacks.

So if I wanted to provide the message:

Dear {membername}, your latest membership expires in {numberofdays} day(s).

*so, if they are in their 5th day, and their membership lasts 7 days, it would say 2

How could I do this? :(

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 15109
    • View Profile
Re: Script that tells the member when his/her membership will expire
« Reply #3 on: April 17, 2016, 10:29:07 pm »
You would have to subtract the dates. The expire date minus the current date. stored as unix time stamps  then divide by unix number for days to get he number of days.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/
Like Like x 1 View List

Offline shuban

  • Hero Member
  • *****
  • Posts: 657
    • View Profile
    • Homework Clinic - Your Academic Lifeline
Re: Script that tells the member when his/her membership will expire
« Reply #4 on: April 17, 2016, 10:30:53 pm »
I wish I could pay you to do this for me (I don't have PayPal)! I would love to learn on my own, but it would probably take me a month lol

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
3204 Views
Last post November 17, 2006, 10:20:50 am
by SMFHacks
2 Replies
3143 Views
Last post May 16, 2009, 05:28:21 pm
by Wegg
3 Replies
6013 Views
Last post October 02, 2009, 08:55:11 pm
by SMFHacks
2 Replies
2493 Views
Last post December 11, 2009, 04:42:59 pm
by majorwood
0 Replies
2626 Views
Last post May 24, 2011, 11:47:02 am
by fussilet

+- Recent Topics

Download System Lite by Rock Lee
June 03, 2020, 07:34:24 pm

Font question by SMFHacks
May 27, 2020, 08:15:26 am

Error message with latest SMF 2.1 Github build by Hatshepsut
May 25, 2020, 01:43:26 am

smfblog not working on 2.0.17 by tech9
May 20, 2020, 01:44:34 pm

Copyright removal by stbc
May 18, 2020, 01:27:57 am

Mod Verified User i can't square the image by Rock Lee
May 07, 2020, 07:56:10 pm

SMF4Mobile 2.0 released for SMF 2.0.x by SMFHacks
May 06, 2020, 12:13:14 pm

SMF Social Login Pro - Discontinued? by Nicole
May 02, 2020, 05:47:04 pm

Likes by SMFHacks
April 30, 2020, 09:50:35 pm

Upgrade Issue - by SMFHacks
April 28, 2020, 12:40:13 pm

Powered by EzPortal