Page 1 of 1

php includes in header and footer templates of public pages

PostPosted: 3:27pm, Fri 02 Mar, 2007
by momotiki
My site uses php includes and I was wondering if it is possible to use php includes within the templates for the public pages in the configuration menu, or on the subscribe pages?

It seems like it should, but when I included this line:

It didn't include anything and the above line is visible when I look at the page source. Advice?

It seems like the script isn't even trying to execute, since require should theoretically return an error.

PostPosted: 3:35pm, Fri 02 Mar, 2007
by Hernol
Where are you using the php tag? In the 'header' text box of the subscribe page? that wont work.

PostPosted: 3:42pm, Fri 02 Mar, 2007
by momotiki
yes. I closed the </head> first, so I thought that would work. Why won't it? Is there a way around it?

PostPosted: 4:04pm, Fri 02 Mar, 2007
by Hernol
Those text boxes can't contain php code.

PostPosted: 4:27pm, Fri 02 Mar, 2007
by momotiki
So if I use php includes for the top menu on the rest of my website, in order to update my phplist public pages I will have to change them manually via the config menu or custom subscribe pages? Not that big a hassle in the scheme of things, but I was hoping for a cleaner solution. Any ideas?


P.S. I know I can embed phplist forms in my existing pages. I may go that route.

PostPosted: 4:35am, Sat 17 Mar, 2007
by rgbworld
I am looking for this exact same functionality. That is, I would like o be able to include my navigation bars, etc by using an include statement in the Subscribe Pages header and footer.

Maybe as a new feature, you could provide us with a psuedo tag like [Include 'filename.php']. When you build the pages, substitute the tag with a php include statement and siphon our filename out of the tag.

Should be pretty simple right? :lol:

Anyways. great script. Its a shame that I can edit my navigation bars throughout my site by editing 1 php file, and now I have to remember to fix these headers/footers as well. :cry:

Actually I have to teach the site owner to do it as they want to be able to make edits, or it would be no big deal.

Let me know is this is a valid Feature Request?


PostPosted: 9:39am, Sat 17 Mar, 2007
by noneleft
momotiki, I am also having the same problem with PHP includes. However, unlike you, I can't work out how to embed the messages. Can you enlighten me? I've embedded the subscription form ok.


PostPosted: 12:25pm, Wed 28 Mar, 2007
by momotiki
Unfortunately I decided not to try embedding and just manually inserted the code for my headers/nav bars, etc, so I never played around with embedding.

I remember seeing several posts and/or documentation articles on embedding subscribe forms in websites though.

UPDATE: Oops, after re-reading your post the subscribe form is fine. I sort of assumed that embedding other stuff would be like embedding the subscribe forms but I guess not. Good luck!

Re: php includes in header and footer templates of public pa

PostPosted: 1:40am, Mon 16 Feb, 2015
by devastor
I search for the same technique.

My page work with php code in html files. I changed my apache server via htaccess to do so.

I was so happy to find that option and now I can not include my menu, header and footer in the header and footer section of phplist.

I use custom page for thank you and confirmation page but I can't figure out how to do it with the unsubscribe page, because the form there will be generated.

So i want to do this with the "normal" way, but now I find out it would not be my personal normal way as i thought, because that simple textboxes can not read php includes.

At least i know how to change the text in the language file, where I could also add html tags.

So that is my last problem with the conversion of the script!

Hope somebody will find a option, how to include php files in the header and footer via admin panel or with a hack... :twisted:

Re: php includes in header and footer templates of public pa

PostPosted: 8:54am, Mon 16 Feb, 2015
by Dragonrider
This topic is 8 years old and for version 2. From your other posts, you are running version 3. Please limit your posts to version 3 and where possible, please refrain from posting the same basic question across multiple topics. People do not know which topic to respond to and this soon becomes spam.

Thank you. :)