XFileSharing Pro - Print Template

Message
Author
marcoss88
Posts: 6
Joined: Apr 26, 2012 7:20 pm

Print Template

#1 Postby marcoss88 » Aug 26, 2012 3:04 am

I have to put the mail and on page User
payment_buy_with.html

<TMPL_VAR usr_email>

how do I put the variable on the page?

marcoss88
Posts: 6
Joined: Apr 26, 2012 7:20 pm

Re: Print Template

#2 Postby marcoss88 » Aug 26, 2012 1:50 pm

marcoss88 wrote:I have to put the mail and on page User
payment_buy_with.html

<TMPL_VAR usr_email>

how do I put the variable on the page?
In the index.cgi

In sub Payments
{


Code: Select all

	$ses->PrintTemplate("payments.html",
		%{$c},
		plans => \@plans, 
		premium => $ses->getUser && $ses->getUser->{premium},
		expire_elapsed => $ses->getUser && $et->convert($ses->getUser->{exp_sec}),
		'rand' => $ses->randchar(6),
		'usr_email'   => $ses->getUser && $ses->getUser->{usr_email},
		'usr_login' => $ses->getUser && $ses->getUser->{usr_login},
	);
'usr_email' => $ses->getUser && $ses->getUser->{usr_email},
'usr_login' => $ses->getUser && $ses->getUser->{usr_login},


Use: <TMPL_VAR usr_login> and <TMPL_VAR usr_email>

marcoss88
Posts: 6
Joined: Apr 26, 2012 7:20 pm

#3 Postby marcoss88 » Aug 26, 2012 1:51 pm

Thanks ;D

ufkabakan
Posts: 332
Joined: Apr 13, 2011 9:37 pm

#4 Postby ufkabakan » Sep 07, 2012 1:05 pm

Im try to use this trick on another page like:

Code: Select all

sub Page
{
   my $tmpl = shift || $f->{tmpl};
   $ses->{language}=$c->{default_language} unless -e "Templates/Pages/$ses->{language}/$tmpl.html";
   &UploadForm unless -e "Templates/Pages/$ses->{language}/$tmpl.html";
   $ses->PrintTemplate("Pages/$ses->{language}/$tmpl.html");
'usr_email' => $ses->getUser && $ses->getUser->{usr_email},
'usr_login' => $ses->getUser && $ses->getUser->{usr_login}, 
}
But dont work <TMPL_VAR usr_email>
I will use my loged users email on my www.domainaname.com/page/abc.html

Its work on payments.html but dont work on "page/abc.html"
I think some declarations is missing.

ufkabakan
Posts: 332
Joined: Apr 13, 2011 9:37 pm

#5 Postby ufkabakan » Sep 10, 2012 4:03 pm

Any idea about this trick?

This post need a Perl Guru?