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 
Include adv. GB to another .php-file  XML
Forum Index » Support Forum
Author Message
Anonymous



Hi,

First of all, thanks for this great Advanced Guestbook! Works like a charm.

Then question;

How do I include GB to dynamic content page? ie. I have site with one common layout template and content is included with SSI to "content table". I don't use frames, I only include content like:

But I already find out that SSI can not include PHP-files. (am I right?)

So far I learned that PHP can do the same trick, for example:



that includes guestbook to my content-table, BUT all links to pictures and other GB .php-files point to my html-root, not to guestbook/ -directory.

Any idea if this is possible without using frames, or is there any easy way to make PHP to sort of change directory before executing included file?

Best Regards,
PS
Anonymous



Hi,

I've been struggling with the same thing. I think I almost managed to solve this problem, but I got stuck on the variable in form.php

the action of the form inside this document refers to $self, and I have NO idea where this variable is defined.

First of all:
Add the following tag in header.php

<base href="yourdomain/guestbook/> DON'T forget the slash at the end!!

And insert tags looking like this in your parent document (in which you already included the guestbook)

<?php
switch(strtolower($_GET['id'])) {

case "guestbook": $page="guestbook/index.php";break;
case "poll": $page="poll.php";break; case "addentry": $page="guestbook/addentry.php";break;
case "admin": $page="guestbook/admin.php";break;

default: $page="defaultpage.html";break; } include($page);

?>

Major problem is that you now have to modify every link like 'return to guestbook' etc in every page. This is quite some work and eventually you still have nothing, because in the end you can't post and preview new messeges

But who knows this might get you started.
Grz

<a href="mailto:webkneus@WASSADAMO.com>DoDo60</a>

PS: Please let me know if you came up with a solution
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum