Author Topic: help! include from language dir  (Read 3375 times)

0 Members and 1 Guest are viewing this topic.

Offline starkeeper

  • Pre-Newbie
  • Posts: 5
    • View Profile
help! include from language dir
« on: June 29, 2005, 02:16:32 PM »
i have a big problem but im not  the biggest programmer and after trying 2 hours, maybe sombody can help me here :wink:
i think its only a small thing - if you know how ;)

thats what i wanna do:

in my template dir i have a include folder for every language:

include_deutsch
include_english
include_spanish

I want to put there files to include like "start.php" which have a table with the main contens for the german startpage.

i want to call this table in the home.html template with something like {lang_starttable} , so that the page is including the start.php from the template/mytemplate/include_deutsch/ folder.

think its easy if you know how - but im more a designer than a programmer ;)
if somebody can tell me what i have to do.. i could help with design :)

thank you

Marco





Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: help! include from language dir
« Reply #1 on: June 30, 2005, 01:00:16 AM »
since none template files will not be parsed by 4images, u can try include your "start.php" files directly from a template, with something like this:
Code: [Select]
<?php
global $config;
include(
TEMPLATE_PATH."/include_".$config['language_dir']."/start.php");
?>

This method require enable php execution in templates (check includes/constants.php)
http://www.4homepages.de/forum/index.php?topic=4295.0
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline starkeeper

  • Pre-Newbie
  • Posts: 5
    • View Profile
Re: help! include from language dir
« Reply #2 on: June 30, 2005, 12:07:15 PM »
thank you Vaņo for your quick help, i will take a look at this ;)