![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
CRAZY MOFUKKA
Industry Role:
Join Date: Jun 2006
Posts: 3,296
|
Any Smarty Programmers Around?
got a question guys if you got the time. Trying to include a html file into a NATS (smarty) template. I tried the usual
{include} {/include} still doesnt seem to work. any ideas? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
The Thrilla in Manila
Join Date: Sep 2004
Location: Thurbs' Lagoon, Christmas Island
Posts: 4,785
|
try {literal}{/literal} around the regular include.
- thurbs |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Feb 2005
Location: Costa Rica
Posts: 2,514
|
http://www.smarty.net/manual/en/lang...on.include.php
{include file='page_footer.tpl'} Did you try it like that above? Jim |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 | |
The Thrilla in Manila
Join Date: Sep 2004
Location: Thurbs' Lagoon, Christmas Island
Posts: 4,785
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,229
|
Smarty in NATS has including disabled. {include file='page_footer.tpl'} will not work.
You need to use a smarty plugin. Hit up TheDoc, i wrote one for him some time ago.
__________________
Mechanical Bunny Media Mechbunny Tube Script | Mechbunny Webcam Aggregator Script | Custom Web Development |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 | |
Confirmed User
Join Date: Feb 2005
Location: Costa Rica
Posts: 2,514
|
Quote:
Here's what someone would need to do if they wanted the custom plugin function: Goto your nats/smarty-2.6.18/libs/plugins (or whatever version of smarty you have) and create a file called: function.fileinc.php then enter this into the file: <?php function smarty_function_fileinc($params) { include($params['file']); } ?> After that file is created and the code inserted, you can use this smarty tag on any of the NATS Templates: {fileinc file="path/to/file"} Hope this helps everyone, and people in the future ![]() Jim |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
CRAZY MOFUKKA
Industry Role:
Join Date: Jun 2006
Posts: 3,296
|
nailed it,
thanks for the guidance on writing the plugin jim! |
![]() |
![]() ![]() ![]() ![]() ![]() |