XFileSharing Pro - How I can change from day's to year ?

Message
Author
ALMGHARI
Posts: 50
Joined: Jun 07, 2008 5:37 pm

How I can change from day's to year ?

#1 Postby ALMGHARI » Dec 14, 2010 8:52 pm

Hello,

Please, How I can change from day's to year ?
in payments page
from 356 days to 1 year

Thanks.

ruben
Posts: 57
Joined: Nov 06, 2010 2:22 pm

#2 Postby ruben » Dec 17, 2010 10:50 pm

Yea i'd really like to know that to..

User avatar
PilgrimX182
Posts: 2186
Joined: Mar 22, 2006 1:39 pm

#3 Postby PilgrimX182 » Dec 22, 2010 9:40 am

It's possible.
In Templates/payment_buy_with.html replace

Code: Select all

<TMPL_VAR days> <TMPL_VAR lang_days>
with

Code: Select all

<TMPL_VAR days>
then in index.cgi replace

Code: Select all

push @plans, { amount=>$1, days=>$2, site_url=>$c->{site_url} };
with

Code: Select all

push @plans, { amount=>$1, days=>($2==365 ? "1 year" : "$2 days"), site_url=>$c->{site_url} };

ruben
Posts: 57
Joined: Nov 06, 2010 2:22 pm

#4 Postby ruben » Dec 24, 2010 1:56 pm

and how to change 31 days to 1 month and 93 days to 3 months and
186 days to 6 months ?

Thanks pilgrim your really pro.

ALMGHARI
Posts: 50
Joined: Jun 07, 2008 5:37 pm

#5 Postby ALMGHARI » Feb 09, 2011 2:34 pm

ruben wrote:and how to change 31 days to 1 month and 93 days to 3 months and
186 days to 6 months ?
Yes please, And 730 days to 2 years

Important

ALMGHARI
Posts: 50
Joined: Jun 07, 2008 5:37 pm

#6 Postby ALMGHARI » Feb 13, 2011 11:35 pm

??

ALMGHARI
Posts: 50
Joined: Jun 07, 2008 5:37 pm

#7 Postby ALMGHARI » Feb 18, 2011 11:59 pm

UP

ALMGHARI
Posts: 50
Joined: Jun 07, 2008 5:37 pm

#8 Postby ALMGHARI » Feb 22, 2011 7:34 pm

UP

PowerChaos
Posts: 521
Joined: Dec 19, 2009 5:12 pm

#9 Postby PowerChaos » Feb 28, 2011 8:57 pm

PilgrimX182 wrote:It's possible.
In Templates/payment_buy_with.html replace

Code: Select all

<TMPL_VAR days> <TMPL_VAR lang_days>
with

Code: Select all

<TMPL_VAR days>
then in index.cgi replace

Code: Select all

push @plans, { amount=>$1, days=>$2, site_url=>$c->{site_url} };
with

Code: Select all

push @plans, { amount=>$1, days=>($2==365 ? "1 year" : "$2 days"), site_url=>$c->{site_url} };
with a little knowledge and messing around can you get it done
he explained it above how to do it

Code: Select all

push @plans, { amount=>$1, days=>($2==365 ? "1 year" : "$2 days"), site_url=>$c->{site_url} };
now lets just fix it for you ok ?

Code: Select all

push @plans, { amount=>$1, days=>($2==31 ? "1 month" : $2==93 ? "3 months" : $2==186 ? "6 months" : $2==365 ? "1 year" : $2==730 ? "2 years" : "$2 days"), site_url=>$c->{site_url} };
as i am not sure of the : command , it is possible that it need to be || instead (or a other command that means OR )

Greets From PowerChaos

ALMGHARI
Posts: 50
Joined: Jun 07, 2008 5:37 pm

#10 Postby ALMGHARI » Mar 09, 2011 1:10 am

PilgrimX182
?