1
rgauci
integrating a simple PHP require_once() in any of xoops pages
  • 2012/9/6 15:15

  • rgauci

  • Not too shy to talk

  • Posts: 173

  • Since: 2007/8/31


Can anyone please help in directing me to where I need to put the following code into a xoops website. This is a shopping cart script where you can integrated into xoops through either an iFrame or PHP require_once() method I have chosen the latter and the instructions I have are the following:

Quote:
You can use a PHP require_once() in any of your PHP pages. At the top of the php page (first line) you should put this lines of code.


(); ob_start(); require_once("/home/xxxxxxx/public_html/shop/frontend/load.php"); $content ob_get_contents(); ob_end_clean(); ?>


Quote:
Edit you .php page and put the code below where you want the shopping cart to appear.


echo $content?>


That's about it apart from a couple of css style sheets which I have already put in the 'head' of the theme file.

Many thanks and appreciate your help in this as I am stuck.

2
Mamba
Re: integrating a simple PHP require_once() in any of xoops pages
  • 2012/9/6 18:19

  • Mamba

  • Moderator

  • Posts: 11412

  • Since: 2004/4/23


If you're creating a module, than I assume that you would put it into the index.php file in the module's main folder.

Unless you want to place it in a block - I guess, it could work too, but I never did it, so check if this would work too. I could be easier than doing a whole module.
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

3
rgauci
Re: integrating a simple PHP require_once() in any of xoops pages
  • 2012/9/6 18:45

  • rgauci

  • Not too shy to talk

  • Posts: 173

  • Since: 2007/8/31


I would prefer to put the code onto a block.

Now do I copy all the script or part of it?

Any instructions on how to implement this?

Login

Who's Online

136 user(s) are online (111 user(s) are browsing Support Forums)


Members: 0


Guests: 136


more...

Donat-O-Meter

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

Latest GitHub Commits