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.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 04-10-2008, 04:09 AM   #1
Big_D
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?
Big_D is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-10-2008, 04:13 AM   #2
Thurbs
The Thrilla in Manila
 
Join Date: Sep 2004
Location: Thurbs' Lagoon, Christmas Island
Posts: 4,785
try {literal}{/literal} around the regular include.

- thurbs
Thurbs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-10-2008, 04:25 AM   #3
jimb
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
jimb is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-10-2008, 04:33 AM   #4
Thurbs
The Thrilla in Manila
 
Join Date: Sep 2004
Location: Thurbs' Lagoon, Christmas Island
Posts: 4,785
Quote:
Originally Posted by jimb View Post
http://www.smarty.net/manual/en/lang...on.include.php

{include file='page_footer.tpl'}

Did you try it like that above?

Jim
nice Jim - the true pimpness of nats
Thurbs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-10-2008, 04:46 AM   #5
k0nr4d
Confirmed User
 
k0nr4d's Avatar
 
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.
k0nr4d is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-10-2008, 06:00 AM   #6
jimb
Confirmed User
 
Join Date: Feb 2005
Location: Costa Rica
Posts: 2,514
Quote:
Originally Posted by k0nr4d View Post
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.
Yeah your right,

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
jimb is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-10-2008, 06:03 AM   #7
Big_D
CRAZY MOFUKKA
 
Industry Role:
Join Date: Jun 2006
Posts: 3,296
nailed it,

thanks for the guidance on writing the plugin jim!
Big_D is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.