|
|
|
||||
|
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 |
|
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
How I can add in a php include into a TPL template file?
because it is a template file it won't allow me to insert the php include directly into it
someone told me I could create a call function and place the php include into the config files and call that function from the config files how do I do that? |
|
|
|
|
|
#2 |
|
Confirmed User
Industry Role:
Join Date: Jun 2003
Location: Costa Rica
Posts: 1,953
|
The simplest way I would think is (apache only example) to just have your server parse php within .tpl extensions. I'm not sure the directive offhand, but if you search around, you'll find what you are looking for!
Goodluck
__________________
Yii Framework Guru - Seasoned PHP vet - Partner @ XXXCoupon.com |
|
|
|
|
|
#3 | |
|
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,197
|
Quote:
The apache directive would be an addtype but because the tpl files are not usually called directly, they are used by the php program to format the output, that will probably not work.
__________________
All cookies cleared! |
|
|
|
|
|
|
#4 |
|
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,197
|
Also, the best way to do it can depend on the system using the tpl file. In smarty templates, you can do a certain amount of logic within the template itself. In something like phpBB it is usually just tags that are filled in without logic within the template.
So, if you told me what you are trying to do with what kind of system it might help
__________________
All cookies cleared! |
|
|
|
|
|
#5 | |
|
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
Quote:
esyndicat is the script |
|
|
|
|
|
|
#6 |
|
Confirmed User
Industry Role:
Join Date: Dec 2002
Location: Behind the scenes
Posts: 5,190
|
Why can't you use include before calling tpl?
offsubject, smarty is great! i'm loving it
__________________
|
|
|
|
|
|
#7 | |
|
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,197
|
Quote:
Good icq session...lol. Glad we got it working. Yeah smarty is pretty easy to work with.
__________________
All cookies cleared! |
|
|
|
|
|
|
#8 | |
|
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,197
|
Quote:
You could do that and just suck it into a tag but we just used a smarty include {include file="jdjdjdj"} It did the trick
__________________
All cookies cleared! |
|
|
|
|
|
|
#9 |
|
Confirmed User
Industry Role:
Join Date: Dec 2002
Location: Behind the scenes
Posts: 5,190
|
cool it worked out that way =)
__________________
|
|
|
|
|
|
#10 |
|
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
thanks so much sarettah, that worked perfectly....you rock as usual!
|
|
|
|