Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

smarty & WHMCS Email templates

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
kirkshawn77371
Smarty n00b


Joined: 11 May 2017
Posts: 2

PostPosted: Thu May 11, 2017 2:54 am    Post subject: smarty & WHMCS Email templates Reply with quote

Hi,
Can anyone help me out on what i need to do to make my PHP banner impressions script to work with WHMCS i want to show the banners in the WHMCS Email templates.

The path would be /home/easttexas/advertising/banners.php

I have tried putting in the email.tpl file
Code:
{php}
// including a php script directly from the template.
include('/home/easttexas/advertising/banners.php');
{/php}

//no luck

Code:
<center>
<? include("banners.php"); ?>
</center>


That dont work at all its like i never put the code in the template. I also tried doing a iframe
Code:
<iframe src="https://example.com/advertising/banners.php" height="500" width="480" border="0" scrolling="no"></iframe>


on the backend where you edit the template it will pull the iframe but not the banners. I made a test account to see if it would pass the iframe off in the client email and it dont show the iframe in the welcome email even though it shows it in the backend where i put it in the welcome email template

You can goto https://example.com/advertising/test.php to see the script works and speeks to the DB

Can you help with this issue? or any ideas?

Thanks In Advance
Shawn H. Kirk
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Thu May 11, 2017 9:33 am    Post subject: Reply with quote

Create a TEMPLATE file with your banner and {include} it into your email template.
Direct inclusion of PHP code is removed from Smarty. If you have this level of access to the site, you can write a Smarty plugin no problem.


Last edited by AnrDaemon on Thu May 11, 2017 9:33 pm; edited 1 time in total
Back to top
View user's profile Send private message
kirkshawn77371
Smarty n00b


Joined: 11 May 2017
Posts: 2

PostPosted: Thu May 11, 2017 8:28 pm    Post subject: Reply with quote

AnrDaemon wrote:
Create a TEMPLATE file with your banner and {include} it into your email remplate.
Direct inclusion of PHP code is removed from Smarty. If you have this level of access to the site, you can write a Smarty plugin no problem.


Issue is i dont understand smarty enough to follow.. i have full root to my server so i can do whatever with my website im just to new to smarty
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Thu May 11, 2017 9:34 pm    Post subject: Reply with quote

http://www.smarty.net/docs/en/
http://php.net/manual/
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP