Facebook  Twitter 

SMFHacks.com

+- +-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 12358
Latest: KekoWorld
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 40096
Total Topics: 7060
Most Online Today: 79
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 42
Total: 42

Author Topic: Script that tells the member when his/her membership will expire  (Read 1768 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: 15052
    • 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: 15052
    • 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
3174 Views
Last post November 17, 2006, 10:20:50 am
by SMFHacks
2 Replies
3098 Views
Last post May 16, 2009, 05:28:21 pm
by Wegg
3 Replies
5963 Views
Last post October 02, 2009, 08:55:11 pm
by SMFHacks
2 Replies
2469 Views
Last post December 11, 2009, 04:42:59 pm
by majorwood
0 Replies
2578 Views
Last post May 24, 2011, 11:47:02 am
by fussilet

+- Recent Topics

[Mod]Telegram AutoPost Bot by SMFHacks
April 06, 2020, 03:38:36 pm

[Mod]SMF2WPBridge - Wordpress Login Bridge by SMFHacks
April 04, 2020, 07:16:59 pm

BUG Message Editor Pro1.0.5 by marcimila
April 04, 2020, 09:01:21 am

MOVED: BUG Message Editor Pro1.0.5 by SMFHacks
April 03, 2020, 07:54:07 pm

Only variables should be passed by reference by Zaphod
April 02, 2020, 11:19:11 am

Cannot install Gallery Pro on SMF 2.1 RC2 by Hatshepsut
March 19, 2020, 12:55:00 am

Newbie questions by SMFHacks
March 08, 2020, 09:28:17 am

Update detect mobile mode PHP5 to PHP7 by Plus
March 05, 2020, 11:19:05 am

Just a hello by Plus
March 05, 2020, 11:05:56 am

Enotify Copyright Problem by SMFHacks
March 04, 2020, 09:21:09 pm

Powered by EzPortal