php includes in header and footer templates of public pages

Once you've installed phpList Version 2... ask questions here!
Forum rules
Please help the volunteers to help you by supplying the version of phpList you are using, browser & version and if possible, a link to your phpList installation. This is for Version 2 of phpList (the orange one).

php includes in header and footer templates of public pages

Postby momotiki » 3:27pm, Fri 02 Mar, 2007

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:
<php>

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.
momotiki
phpLister
 
Posts: 12
Joined: 12:09pm, Fri 23 Feb, 2007

Postby Hernol » 3:35pm, Fri 02 Mar, 2007

Where are you using the php tag? In the 'header' text box of the subscribe page? that wont work.
Hernol
Admin
 
Posts: 1378
Joined: 6:39pm, Thu 18 May, 2006
Location: Argentina

Postby momotiki » 3:42pm, Fri 02 Mar, 2007

yes. I closed the </head> first, so I thought that would work. Why won't it? Is there a way around it?
momotiki
phpLister
 
Posts: 12
Joined: 12:09pm, Fri 23 Feb, 2007

Postby Hernol » 4:04pm, Fri 02 Mar, 2007

Those text boxes can't contain php code.
Hernol
Admin
 
Posts: 1378
Joined: 6:39pm, Thu 18 May, 2006
Location: Argentina

Postby momotiki » 4:27pm, Fri 02 Mar, 2007

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?

Thanks!

P.S. I know I can embed phplist forms in my existing pages. I may go that route.
momotiki
phpLister
 
Posts: 12
Joined: 12:09pm, Fri 23 Feb, 2007

Postby rgbworld » 4:35am, Sat 17 Mar, 2007

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?

Thanks,
Chris
rgbworld
phpList newbie
 
Posts: 2
Joined: 4:09am, Sat 17 Mar, 2007

Postby noneleft » 9:39am, Sat 17 Mar, 2007

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.
noneleft
phpList newbie
 
Posts: 3
Joined: 7:38am, Sat 17 Mar, 2007

embedding

Postby momotiki » 12:25pm, Wed 28 Mar, 2007

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!
momotiki
phpLister
 
Posts: 12
Joined: 12:09pm, Fri 23 Feb, 2007

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

Postby devastor » 1:40am, Mon 16 Feb, 2015

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:
devastor
PL Nut
 
Posts: 25
Joined: 9:46pm, Thu 05 Feb, 2015

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

Postby Dragonrider » 8:54am, Mon 16 Feb, 2015

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. :)
My sites:- http://wharfedalefestival.co.uk, http://ilkleygardeners.org.uk, http://emergencyaid.net, http://dragonrider.co.uk
Latest phpList version is now 3.0.12 (3 February 2015) and requires a minimum of MySQL 5.0 and PHP 5.3.x
Dragonrider
Moderator
 
Posts: 3460
Joined: 6:58am, Sun 02 Jul, 2006
Location: Ilkley, West Yorkshire, United Kingdom


Return to Question & Problems - after installing

Who is online

Users browsing this forum: No registered users and 6 guests

cron