If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
php ssi header - guestbook  XML
Forum Index » Support Forum
Author Message
Anonymous



I use php includes for the header and footer on every page of my site. And I want to use these same files at my guestbook. I'm trying to use Carbonize's method of including my site's header and footer files into the guestbook index.php file via includes. But how do I get the javascript that is needed for the guestbook into my own header file without that javascript appearing in my source code for every other page on my site?

PS - I was going to post this in the advanced guestbook forum, but it said I had to register first.
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

Nothing I can do about that forum requiring membership, I'm just a moderator. Anyway you could remove all surplus HTML from the header.php file so all that is left is javascript and then use the includes method. I must state that the includes method (putting the include code at the top and bottom of index.php etc) will cause an error when posting comments.

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
Anonymous



Okay, thanks.

I just looked closer at your guestbook. And it looks like you have the javascript in the body of your html. I was thinking it had to go in the head section with style and meta tags; hence, my original post. Anyway, I think I'm going to just put the javascript at the very top of the body.php of the guestbook templates.

Thanks.

PS - any reason why using includes causes error when posting comments? Does it completely prevent posting comments or just give an error message?
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

Because the guestbook uses a header to send the poster back to the guestbook after they have posted.

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
Anonymous



where can I delete that header, because I really don't like the automatic redirect.
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

Email me so we can discuss it further.

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum