4images Forum & Community

4images Issues / Ausgaben => Installation, Update & Configuration => Topic started by: abdoh2010 on March 31, 2005, 09:25:47 PM

Title: PHP files in 4images templates
Post by: abdoh2010 on March 31, 2005, 09:25:47 PM
hello every one

i have a problem here and i asking you for help

i have a php file i would like to insert it in 4images templates as {php_file_name}

i tryed my best i couldnt do it

so any one can help me ?
Title: Re: PHP files in 4images templates
Post by: martrix on March 31, 2005, 09:30:12 PM
why don't you insert it like this:

Code: [Select]
<?php include(ROOT_PATH.'yourfilename.php'); ?>
?
Title: Re: PHP files in 4images templates
Post by: abdoh2010 on March 31, 2005, 09:36:14 PM
becouse i want it in the medile on the page not above the header as
Quote
<?php include(ROOT_PATH.'yourfilename.php'); ?>
give me
Title: Re: PHP files in 4images templates
Post by: martrix on March 31, 2005, 09:46:13 PM
then you just have to insert that code on the place, where you want to have it - if on the homepage, then home.html if on the categories page, then categories.html...

give me
yes?
Title: Re: PHP files in 4images templates
Post by: abdoh2010 on April 01, 2005, 12:21:12 AM
THE THING IS HOW CAN I SHOW PHP FILE INSIDE 4IMAGES HTML TEMPLATES ? IN THE center AND middle OF THE HOME.HTML TIMPLATE ?
Title: Re: PHP files in 4images templates
Post by: martrix on April 01, 2005, 12:35:54 AM
1) back-up your files
2) play around with home.html - add for example the string 123 on different places until you find out, where the right place is

That's all I can tell you now as long as I don't know if you use the default 4images template or not...

if it is the default template of 4i 1.7.1, then find this in home.html

Code: [Select]
{if categories}and you may for example insert your php-file ABOVE that:

Code: [Select]
<table width="100%" border="0" cellspacing="0" cellpadding="3">
                          <tr>
                            <td class="row2" valign="top"><?php include(ROOT_PATH.'yourfilename.php'); ?></td>
                          </tr>
                        </table>

Yes, "yourfilename.php" has to be replace by the filename of the php-file you want to insert...
Title: Re: PHP files in 4images templates
Post by: abdoh2010 on April 01, 2005, 04:56:43 AM
that is new infomation for me  :o

that's really what i want thanx man you made a big help for me

i will try it and reply to you for checking
Title: Re: PHP files in 4images templates
Post by: abdoh2010 on April 01, 2005, 05:28:04 AM
i try it and its work  :D

thank you man
Title: Re: PHP files in 4images templates
Post by: martrix on April 01, 2005, 08:55:51 AM
wonderful. :)

That was just one out of thousands of ways how to insert it there...

Have fun