1
iolai
Wrapping another page
  • 2004/9/9 10:25

  • iolai

  • Quite a regular

  • Posts: 206

  • Since: 2004/6/26


I don't want to use another module, but simply to wrap one page. I thought of doing it like this:

include("../../mainfile.php");
include(XOOPS_ROOT_PATH."/header.php");
$xoopsOption['show_rblock'] = 1;

include ("wrapped_page_url_here");

include(XOOPS_ROOT_PATH."/footer.php");
?>

But it isn't working...

Ideas why?

2
Stewdio
Re: Wrapping another page
  • 2004/9/9 10:46

  • Stewdio

  • Community Support Member

  • Posts: 1560

  • Since: 2003/5/7 1


You are very close, except for one thing. You need to replace

include ("wrapped_page_url_here");


with actual content, html tags and all. (Anything within the areas of your code. Everything else is ignored)

Essentially, you do not use the include statement from php, you just copy and paste your code from the html page you want to include. You may have to change how a couple links work, like images and such, but I do this all the time with plain html pages, calandar scripts, guestbooks and even got Moveabale Type wrapped into XOOPS.

This is by far the easiest and fastest way to drop in content on the fly without having to build a module.

You may need to change the relative link of:
include("../../mainfile.php"); to something like:
include("/mainfile.php");

I have had to do this on occasion depending on the script I want to incorportate. Mainly I have only had to do this for anything in a subfolder of XOOPS. Pages in your root will not need to be adjusted with ../../ etc.

Proper experimentataion will get the results you need, depending on the root of your XOOPS installation and the location of your images and files.

Hope this helps.

3
iolai
Re: Wrapping another page
  • 2004/9/9 11:14

  • iolai

  • Quite a regular

  • Posts: 206

  • Since: 2004/6/26


Ok, so I understand I can embed only static content this way, and only content I have access to.

How can I embed dynamic content from other sites in it?

4
Stewdio
Re: Wrapping another page
  • 2004/9/9 11:41

  • Stewdio

  • Community Support Member

  • Posts: 1560

  • Since: 2003/5/7 1


You could use