Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4255
Latest: andreios
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 43260
Total Topics: 7518
Most Online Today: 297
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 1
Guests: 266
Total: 267

Author Topic: Script that tells the member when his/her membership will expire  (Read 3876 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: 16436
    • 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: 16436
    • 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
3778 Views
Last post November 17, 2006, 10:20:50 am
by SMFHacks
3 Replies
7240 Views
Last post October 02, 2009, 08:55:11 pm
by SMFHacks
2 Replies
3385 Views
Last post December 11, 2009, 04:42:59 pm
by majorwood
0 Replies
4133 Views
Last post May 24, 2011, 11:47:02 am
by fussilet
6 Replies
998 Views
Last post November 16, 2021, 02:40:47 am
by Vincent Volmer

+- Recent Topics

No thumbnails on new uploads by Tonyvic
Today at 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

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Gallery icon as last added image by fvlog19
February 01, 2024, 01:04:56 pm

Powered by EzPortal