HI,now i am still using very old xfilesharing pro mabybe 2.0 (April 2012)
.So i need user to Register first then redirect to payment,what should i do?
XFileSharing Pro - i need user should Register first then redirect to payment
There are two ways for that
#1 method
Go to admin settings ... then payments settings ... then but correct mark in checkbox of ( Register anon users first, then redirect to payment )
#2 method
Open the file cgi-bin/XFileConfig.pm in any text editor, then go to the term :
no_anon_payments => ' ' ... now put the value ( 1 ) :
no_anon_payments => '1'
#1 method
Go to admin settings ... then payments settings ... then but correct mark in checkbox of ( Register anon users first, then redirect to payment )
#2 method
Open the file cgi-bin/XFileConfig.pm in any text editor, then go to the term :
no_anon_payments => ' ' ... now put the value ( 1 ) :
no_anon_payments => '1'
Well... there is another method ... It works for XFS 2.1 and the following releases, but about XFS 2.0 and the previous releases I'm not sure, so you have to try ...
Go to the file ( cgi-bin/index.cgi ) and open it by any text editor, then add this code in the bottom of page :
save the editing and check on the filehost, does it work ?
But make sure to make a backup for the file index.cgi, to recover it if that method didn't work or if it caused any problem in script ...
Go to the file ( cgi-bin/index.cgi ) and open it by any text editor, then add this code in the bottom of page :
Code: Select all
if($c->{no_anon_payments} && !$ses->getUser)
{
$ses->redirect("$c->{site_url}/?op=registration&next=payments-$f->{type}-$f->{amount}");
}
But make sure to make a backup for the file index.cgi, to recover it if that method didn't work or if it caused any problem in script ...
I really didn't deal with XFS 2.0 before and I don't have a copy of it to see what are the values it exactly contains ... so I cannot help a lot ...
The last method I can tell you about it is to go to the file " template/main.html " ... and to edit the code of premium/ payment button.
In the following code, just the registered users can see the premium/payment page, but the anonymous will see registration page when they click on premium/payment page ...
And if in your XFS script there is no need for a message to activate the account :
So the anonymous should register first then immediately he will be redirected to payment page ( I'm not sure this code will work in XFS 2.0 because some values might be not exist )
That is the simplest method. if it didn't work I suggest to wait for answer from guys who have an experience with old releases of XFS, or to ask Sibsoft support .... but the best thing is to upgrade your XFS script to 2.1 at least ...
.
The last method I can tell you about it is to go to the file " template/main.html " ... and to edit the code of premium/ payment button.
In the following code, just the registered users can see the premium/payment page, but the anonymous will see registration page when they click on premium/payment page ...
Code: Select all
<TMPL_IF my_login>
<a href="<TMPL_VAR site_url>/premium.html">PREMIUM</a>
<TMPL_ELSE>
<a href="<TMPL_VAR site_url>/?op=registration">PREMIUM</a>
</TMPL_IF>
Code: Select all
<TMPL_IF my_login>
<a href="<TMPL_VAR site_url>/premium.html">PREMIUM</a>
<TMPL_ELSE>
<a href="<TMPL_VAR site_url>/?op=registration&next=payments--"> PREMIUM</a>
</TMPL_IF>
That is the simplest method. if it didn't work I suggest to wait for answer from guys who have an experience with old releases of XFS, or to ask Sibsoft support .... but the best thing is to upgrade your XFS script to 2.1 at least ...
.
yeah,i got it
it is in payment_buy_with.html
<TMPL_IF paypal_email><TD><a href="<TMPL_VAR site_url>/?op=payments&amount=<TMPL_VAR amount>&type=paypal&r=<TMPL_VAR rand>"><img src="<TMPL_VAR site_url>/images/buy_paypal.gif" border=0 alt="PayPal"></a></TD></TMPL_IF>.
BUT i do not know how to edit it with <TMPL_IF my_login> and <TMPL_ELSE>??
as there are two <TMPL_IF
thanks for your help
it is in payment_buy_with.html
<TMPL_IF paypal_email><TD><a href="<TMPL_VAR site_url>/?op=payments&amount=<TMPL_VAR amount>&type=paypal&r=<TMPL_VAR rand>"><img src="<TMPL_VAR site_url>/images/buy_paypal.gif" border=0 alt="PayPal"></a></TD></TMPL_IF>.
BUT i do not know how to edit it with <TMPL_IF my_login> and <TMPL_ELSE>??
as there are two <TMPL_IF
thanks for your help
no not this one ... the button I meant is the one of menu bar, which you want it to redirect the anonymous first to registration page, then to payment/premium page ! ... it supposes to be in the main page of your filehost ...free515 wrote:yeah,i got it
it is in payment_buy_with.html
<TMPL_IF paypal_email><TD><a href="<TMPL_VAR site_url>/?op=payments&amount=<TMPL_VAR amount>&type=paypal&r=<TMPL_VAR rand>"><img src="<TMPL_VAR site_url>/images/buy_paypal.gif" border=0 alt="PayPal"></a></TD></TMPL_IF>.
BUT i do not know how to edit it with <TMPL_IF my_login> and <TMPL_ELSE>??
as there are two <TMPL_IF