Facebook  Twitter 

SMFHacks.com

+- +-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 12350
Latest: cl4ude327
New This Month: 2
New This Week: 0
New Today: 0
Stats
Total Posts: 40048
Total Topics: 7051
Most Online Today: 77
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 34
Total: 34

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

0 Members and 1 Guest are viewing this topic.

Offline shuban

  • Hero Member
  • *****
  • Posts: 653
    • 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: 15029
    • 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: 653
    • 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: 15029
    • 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: 653
    • 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
3165 Views
Last post November 17, 2006, 10:20:50 am
by SMFHacks
2 Replies
3085 Views
Last post May 16, 2009, 05:28:21 pm
by Wegg
3 Replies
5948 Views
Last post October 02, 2009, 08:55:11 pm
by SMFHacks
2 Replies
2466 Views
Last post December 11, 2009, 04:42:59 pm
by majorwood
0 Replies
2553 Views
Last post May 24, 2011, 11:47:02 am
by fussilet

+- Recent Topics

[Mod]Avatars Display Integration by SMFHacks
February 15, 2020, 07:30:47 pm

[Mod]BBC Message Boxes 1.0 by SMFHacks
February 15, 2020, 07:26:46 pm

[Mod]Stack Trace by live627 by SMFHacks
February 15, 2020, 07:21:33 pm

Stripe Integration by SMFHacks
February 08, 2020, 10:55:29 pm

SMF Store 4.0 Released by SMFHacks
January 26, 2020, 12:11:56 pm

Order of photos by D4611001
January 21, 2020, 12:06:36 pm

Cannot install by SMFHacks
January 18, 2020, 09:40:56 pm

Call to undefined function mysql_query() by SMFHacks
January 18, 2020, 02:06:47 pm

English British Translation file by HAL9000
January 17, 2020, 05:44:28 pm

Characters dispayed as boxes by SMFHacks
January 16, 2020, 07:21:51 am

Powered by EzPortal