Author Topic: include to the templates no problem in 1.7.1  (Read 28072 times)

0 Members and 1 Guest are viewing this topic.

Offline ID25

  • Full Member
  • ***
  • Posts: 125
    • View Profile
include to the templates no problem in 1.7.1
« on: August 13, 2005, 05:55:41 PM »
i can include to the templates

ex: <?php echo("menu.php"); ?>

i know what in version 1.7 4images this not working, but on 1.7.1 this working ok :)
and no problem, what you say, there is ok at this version?

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: include to the templates no problem in 1.7.1
« Reply #1 on: August 13, 2005, 07:32:35 PM »
ok, are you having problem or what? what is your question? if u looking for an oppinion, then this topic is belong to chit-chat forum, if you are experiencing problem then please tell so.
otherwise look in the FAQ on how to properly include another .php file in the templates.
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 ID25

  • Full Member
  • ***
  • Posts: 125
    • View Profile
Re: include to the templates no problem in 1.7.1
« Reply #2 on: August 13, 2005, 08:14:00 PM »
There is Discussion and topic is  Discussion...

 Discussion about:
or there is bug, or all ok in 1.7.1 version
May i can include <?php echo("file.php"); ?>
there is no problem on that version?

Why i must do this:
Code: [Select]
<?php
include($_SERVER['DOCUMENT_ROOT']."/images/file.php");
?>


if i can do this in simple mode <?php echo("file.php"); ?>
in 1.7.1 version

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: include to the templates no problem in 1.7.1
« Reply #3 on: August 13, 2005, 08:21:58 PM »
1) echo("file.php") will output file.php as a string and not content of the file.php file.
2) the point of the topic in FAQ is that u SHOULD NOT have anything on the same line with <?php and ?> and not about what kind of path must be used for the included file.

P.S. I'm moving this topic in Chit-Chat.
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 ID25

  • Full Member
  • ***
  • Posts: 125
    • View Profile
Re: include to the templates no problem in 1.7.1
« Reply #4 on: August 13, 2005, 08:53:08 PM »
if i put echo("file.php") in home.html there is ok?
if in file.php just HTML code

maybe 4images faster work with this...

Offline ID25

  • Full Member
  • ***
  • Posts: 125
    • View Profile
Re: include to the templates no problem in 1.7.1
« Reply #5 on: August 13, 2005, 09:00:16 PM »
Maybe you don't understand me..

I want to make one file for menu and one for banner, why?
because if i change something in one file, in all templates and all pages this info will be changed

What i must do, that site work good and fast?

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: include to the templates no problem in 1.7.1
« Reply #6 on: August 14, 2005, 06:00:52 AM »
u dont use echo, u should use include()
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 ID25

  • Full Member
  • ***
  • Posts: 125
    • View Profile
Re: include to the templates no problem in 1.7.1
« Reply #7 on: August 14, 2005, 04:24:26 PM »
ok, thank's

at now i understand that i must do this:
Code: [Select]
<?php
include($_SERVER['DOCUMENT_ROOT']."/images/file.php");
?>

and only this
in templates...

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
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 ID25

  • Full Member
  • ***
  • Posts: 125
    • View Profile
Re: include to the templates no problem in 1.7.1
« Reply #9 on: August 14, 2005, 09:27:16 PM »
if i understand right, need do that? :
Code: [Select]
<?php
include($_SERVER['DOCUMENT_ROOT']."http://www.mysite.com/images/file.php");
?>

but if i want place this template in other site, need replace all this....  bad idea
--- --- ---
my english bad :/

TheOracle

  • Guest
Re: include to the templates no problem in 1.7.1
« Reply #10 on: August 15, 2005, 01:47:07 PM »
I still don't understand why you wish to add a PHP file inside your images path.

It should, rather, go like this :

Code: [Select]

<?php
include($_SERVER['DOCUMENT_ROOT']."/file.php");
?>



That's all there is . . .

Offline ID25

  • Full Member
  • ***
  • Posts: 125
    • View Profile
Re: include to the templates no problem in 1.7.1
« Reply #11 on: August 15, 2005, 07:56:40 PM »
Because this php is in images category, not in root(www.mysite.com)

TheOracle

  • Guest
Re: include to the templates no problem in 1.7.1
« Reply #12 on: August 15, 2005, 08:23:18 PM »
So ... the question comes again : Why does it have to be specificly in the images folder ?

Offline ID25

  • Full Member
  • ***
  • Posts: 125
    • View Profile
Re: include to the templates no problem in 1.7.1
« Reply #13 on: August 15, 2005, 08:30:56 PM »
because this is from 4images peace of template, 4images installed to "images" dir
why i must cycle all site?

where 4images, there all files for 4images...
all templates use this php from "images" dir

TheOracle

  • Guest
Re: include to the templates no problem in 1.7.1
« Reply #14 on: August 15, 2005, 09:42:25 PM »
Quote

all templates use this php from "images" dir


False. PHP files are being executed from - either - the root path of 4images or from a subfolder outside the template path. ;)