Welcome to Geeklog, Anonymous Friday, December 27 2024 @ 03:35 am EST

Geeklog Forums

Include PHP file in footer?


Status: offline

Saleel

Forum User
Newbie
Registered: 11/22/04
Posts: 10
Hi

I have a .php file (just a simple ad script) I need to place inside my footer.thtml. I've tried using:

Text Formatted Code
<?php include "filename.php"; ?>

 


But that doesn't work.

I tried placing the contents of the .php file into functions.php and making a function out of it, and then calling the function in footer.thtml, but that didn't work either.

(Using IFRAME does work, but it does not fit my requirements).

Any ideas?

Thanks.
 Quote

Status: offline

ScurvyDawg

Forum User
Full Member
Registered: 11/06/02
Posts: 523
have you tried using the full file path?

Text Formatted Code

<?php include "/home/username/public_html/filename.php"; ?>

 


Just guessing.

Blah Blah Blah Blah ...
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
only the header.thtml template file will have PHP parsed. This is provided for in COM_siteHeader().
however, I seem to recall a recently introduced function that will allow this. I cant remember where I saw it tho. sorry.

you could probable just edit COM_siteFooter to suit your purposes, or better yet, create a custom COM_siteFooter in the functions.php file of your desired theme.
 Quote

Status: offline

Saleel

Forum User
Newbie
Registered: 11/22/04
Posts: 10
Quote by machinari: only the header.thtml template file will have PHP parsed. This is provided for in COM_siteHeader().
however, I seem to recall a recently introduced function that will allow this. I cant remember where I saw it tho. sorry.

you could probable just edit COM_siteFooter to suit your purposes, or better yet, create a custom COM_siteFooter in the functions.php file of your desired theme.


Hmm, sorry, I don't understand. Could you go through it?

Thanks.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
PHP is only supported in header.thtml. There's no way to use it in footer.thtml, unless you hack the core code.

bye, Dirk
 Quote

All times are EST. The time is now 03:35 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content