PDA

View Full Version : counter: days left in free trial


btappan
04-27-2005, 01:39 AM
On my forums I have it set up so that a new member gets 90 days free to use the site and then they have to pay. I need a line of code to put on the index page that says "you have XX days left in your 90 day free trial" can somebody please help me with this?

Paul M
04-27-2005, 01:51 AM
You would need to add a small piece of code to index.php which subtracts the current time from the users join date, then converts this to a number of days, and then subtracts that from 90. You then add a bit to the forumhome template to display the value. You would need to surround this with some sort of conditional to only display it if they were in the "non paid" usergroup(s).

btappan
04-27-2005, 02:07 AM
hey thanks for the qucik response. how can i get the code into date format? as in: todays date (-) join date (=) XX ?? basically, do you havy any suggestions on how to code the conditional? Sorry, I've been away from my small knowlege of coding for too many months now. Thanks

LEAD_WEIGHT
04-27-2005, 02:39 AM
Sounds like u asking for free service when this is $$$ u are talking about. This is quite specialize code :lick:

Paul M
04-27-2005, 03:57 AM
Sounds like u asking for free service when this is $$$ u are talking about. This is quite specialize code :lick:Are you taking the Mickey ? This is a few simple lines.

I'm at work atm so I don't have time to look in detail, possibly tonight (which is another 12+ hours uk time).

LEAD_WEIGHT
04-27-2005, 04:02 AM
Are you taking the Mickey ? This is a few simple lines.

I'm at work atm so I don't have time to look in detail, possibly tonight (which is another 12+ hours uk time).

Since u up to it then please make it attach to c/panel so we can extend a members free membership.

Paul M
04-27-2005, 04:29 AM
Since u up to it then please make it attach to c/panel so we can extend a members free membership.eh ? I have no idea what you are talking about, but this a vb thing, it has no connection with cpanel ...... :confused:

LEAD_WEIGHT
04-27-2005, 05:17 AM
eh ? I have no idea what you are talking about, but this a vb thing, it has no connection with cpanel ...... :confused:

U have no idea then how can u create this with no thought. :confused:

Paul M
04-27-2005, 05:46 AM
um, okay, whatever. What planet are you from again ...

Marco van Herwaarden
04-27-2005, 06:08 AM
@btappan

The best way to go seems to be is to use the Payed Subscriptions for this (without a charge ofcourse). There is already a hack available that will show how many days you have got left for your subscription.

@LEAD_WEIGHT
What got CPanel to do with access to vB forum?

manguish
04-27-2005, 08:29 AM
I think he means usercp...... To link to subscriptions ;)

mholtum
04-27-2005, 09:28 AM
I think he means usercp...... To link to subscriptions ;)
I thought the same thing User(control panel) & admin(control panel)

Marco van Herwaarden
04-27-2005, 09:56 AM
Ahh, ok maybe i misunderstood him. :D

btappan
04-27-2005, 11:44 AM
I don't see many people bothering to sign up for a free trial if they still have to go through the paypal process...It makes it look too much like a service you have to cancel or you will get charged..I know its with $0.00 dollars but still. Also below is what I am using to do the free trial..Its a Promotion and not a subscription.

Configure the Registered Users group so it has access to the restricted features. This will be your "free trial" group. When users register they are automatically put into the Registered Users group.

Now setup a promotion that changes a user's group (ends the trial) after a period of time. You can do this in your:

Admin CP -> Usergroups -> Promotions -> Add New Promotion

Use these settings:

Usergroup = Registered Users
Reputation Comparison Type = Greater or Equal to
Days Registered = the length of your free trial
Promotion Strategy = Join Date
Promotion Type = Primary Usergroup

Move User to Usergroup = choose a usergroup that doesn't have access to the restricted features

Now when a user has been registered for the amount of time you specified, they will have their trial access taken away. To get access back they will need to purchase a subscription in their User CP.

Anybody got any more help on this for the counter - Now that my thread has been taken over? :nervous:

I could simplify it by making it so it said your 90 day free trial expires on : DD/MM/YYYY by having something like ($joindate + 90 days) = DD/MM/YYYY in a conditional, but I don't even know how to that. Anybody?