1
briforge
external site redirecting back to my site .php
  • 2005/7/19 18:07

  • briforge

  • Just popping in

  • Posts: 14

  • Since: 2004/6/25


How can I 'wrap' my .php in my site's XOOPS headers and footers, when an external site is redirecting a user back to my .php?

I'm trying to do some PayPal integration and have the users redirected back to my site after they pay for something. I've got the redirect working back to my .php, but I just put it in a subdirectory and point them straight to it, and so it comes up plain, w/out any XOOPS headers/footers/menu.

I'm still a newbie so I'm thinking I'm missing something basic. I'm not sure which module or block to use to enter my script.

Thanks

2
dickinsd
Re: external site redirecting back to my site .php
  • 2005/7/19 18:55

  • dickinsd

  • Quite a regular

  • Posts: 278

  • Since: 2004/11/14


Hello there.

This is the php code that I use to wrap html pages, it is the code that calls the XOOPS footer/header.

<?php
include("../mainfile.php");
include(
XOOPS_ROOT_PATH."/header.php");
?>
<html>
     ....
     ....
     ....
</html>
<?php
include(XOOPS_ROOT_PATH."/footer.php");
?>


That code is on this site somewhere already, and like I said, I use it to display a few static HTML pages, and it works just fine, I guess you can just replace the HTML tags for your PHP code.

Hope that works for you.

Dave

3
dickinsd
Re: external site redirecting back to my site .php
  • 2005/7/19 19:02

  • dickinsd

  • Quite a regular

  • Posts: 278

  • Since: 2004/11/14


Have just quickly tried using the footer and header with some other PHP.

<?php
include("../mainfile.php");
include(
XOOPS_ROOT_PATH."/header.php");

// Show all information, defaults to INFO_ALL
phpinfo();

// Show just the module information.
// phpinfo(8) yields identical results.
phpinfo(INFO_MODULES);
include(
XOOPS_ROOT_PATH."/footer.php");
?>


This produced the expected result (almost) in that I had my sites header, footer, left and right menus, all with the correct colour scheme and css styling.

the content was just the php info for my server.

This did work, it did change the colour of some of my text in the custom blocks, but if your OK with PHP you can probably figure out what cuased that and stop it from happening on your site.

Dave

4
briforge
Re: external site redirecting back to my site .php
  • 2005/7/19 19:46

  • briforge

  • Just popping in

  • Posts: 14

  • Since: 2004/6/25


Thanks very much! That's exactly what I was looking for, and I've got it working now too.

Login

Who's Online

279 user(s) are online (188 user(s) are browsing Support Forums)


Members: 0


Guests: 279


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits