XFileSharing Pro - (SOLVED): Value <TMPL_VAR usr_id> dont show in payment

Message
Author
creco
Posts: 18
Joined: Aug 26, 2011 12:24 am

(SOLVED): Value <TMPL_VAR usr_id> dont show in payment

#1 Postby creco » Sep 18, 2011 10:40 pm

I have problem.... I write own sms gateway and now i need show in cgi-bin/Templates/payment_buy_with.html value user ID.

But if I use <TMPL_VAR usr_id> nothing is displayed.

Any ideas?
Last edited by creco on Sep 19, 2011 7:21 pm, edited 1 time in total.

nyan
Posts: 163
Joined: Oct 28, 2010 8:01 pm

#2 Postby nyan » Sep 19, 2011 10:55 am

Figure out in what sub payment_buy_with.html is called in index.cgi (ctrl+f)
in the print template , add
'usr_id' => $ses->getuserid,

I'm not 100% sure if it's $ses->getuserid , search the script for $ses and you'll find the correct variable.

creco
Posts: 18
Joined: Aug 26, 2011 12:24 am

#3 Postby creco » Sep 19, 2011 5:09 pm

nyan wrote:Figure out in what sub payment_buy_with.html is called in index.cgi (ctrl+f)
in the print template , add
'usr_id' => $ses->getuserid,

I'm not 100% sure if it's $ses->getuserid , search the script for $ses and you'll find the correct variable.
On what line I insert 'usr_id' => $ses->getuserid, ???

In template my_account.html displeyed value <TMPL_VAR usr_id> correctly.
Why will not appear in payment_buy_with.html?

creco
Posts: 18
Joined: Aug 26, 2011 12:24 am

#4 Postby creco » Sep 19, 2011 7:20 pm

I find solution.

Edit index.cgi

Find line "$c->{bw_limit_prem}||='Unlimited';"

and on next line paste

$c->{extra_user_id} = $ses->getUserId;

And in template use value <TMPL_VAR extra_user_id>

Thank you very much for his idea nyan.