Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4257
Latest: Alex998.
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 43295
Total Topics: 7523
Most Online Today: 230
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 251
Total: 251

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

0 Members and 1 Guest are viewing this topic.

Offline shuban

  • Hero Member
  • *****
  • Posts: 665
    • View Profile
    • Biology Forums
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: 16452
    • 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: 665
    • View Profile
    • Biology Forums
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: 16452
    • 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: 665
    • View Profile
    • Biology Forums
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
3785 Views
Last post November 17, 2006, 10:20:50 am
by SMFHacks
3 Replies
7250 Views
Last post October 02, 2009, 08:55:11 pm
by SMFHacks
2 Replies
3395 Views
Last post December 11, 2009, 04:42:59 pm
by majorwood
0 Replies
4144 Views
Last post May 24, 2011, 11:47:02 am
by fussilet
6 Replies
1013 Views
Last post November 16, 2021, 02:40:47 am
by Vincent Volmer

+- Recent Topics

Please Help! by SMFHacks
April 17, 2024, 08:04:55 am

Rate own images by fvlog19
April 11, 2024, 10:56:53 am

Tidy Child Boards on 2.1.4 by SMFHacks
April 04, 2024, 03:54:12 pm

Problems SMF 2.0.19 > 2.1.4 SMF Gallery Pro - Recents Images to overall header by Michel68
March 30, 2024, 12:41:08 pm

Can't DROP 'id_member'; check that column/key exists Datei: by SMFHacks
March 30, 2024, 11:58:20 am

No thumbnails on new uploads by Tonyvic
March 29, 2024, 06:26:18 am

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

Powered by EzPortal