1
fabou78
How to add simple HTML page to XOOPS
  • 2019/11/11 19:42

  • fabou78

  • Friend of XOOPS

  • Posts: 43

  • Since: 2012/6/16


What would be a very simple way of adding a HTML page to my XOOP website.

By simple I mean a link on my navbar should load an HTML page maintaining the sidebar contents and navbar.

I don’t understand the templating and block system (even I have read some doc about it) so can’t really use that for now and neither want it to be a module as to limit dependencies.

A simple "about us" HTML page with a few lines is all I need and I can build it, I just can't get my head around adding it to my webpage.

Is there an easy way to achieve this?

2
Mamba
Re: How to add simple HTML page to XOOPS
  • 2019/11/11 22:23

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


The following applies If you wish to have a page of HTML content wrapped inside XOOPS without using a content module. This example works if you want the HTML content files to be located in the root of your XOOPS installation. First create a PHP file with the following content using your favorite text editor.
include("mainfile.php");
include(
"header.php");
$xoopsOption['show_rblock'] = 1//0 for no right block
?>

//Your HTML Code here (Note: Do not include head and body tags)

include("footer.php");

?>
Then name this file anything you wish and save it with a .php extension, and upload to the root folder of your XOOPS site. The php extension is important, do not save the file with an HTML extension. To call the file in XOOPS you will need to add a link to it, e.g. in a custom block like this.
<a href="http://www.yoursite.com/content.php">My Content Linka>
Save the block in HTML format making sure it is set to be visible and in the position required. Remember to go to System Admin-> Groups and add access permissions for the block.
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

3
fabou78
Re: How to add simple HTML page to XOOPS
  • 2019/11/12 13:08

  • fabou78

  • Friend of XOOPS

  • Posts: 43

  • Since: 2012/6/16


Thanks Mamba,

I will try it today. Just for my understanding I am not building a block by doing this right? I can just call it from a block if I want to?
I was planning to call it from a link in the navbar so I will try this way first.

4
Mamba
Re: How to add simple HTML page to XOOPS
  • 2019/11/13 0:36

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


That's correct, you're creating a PHP file, and then you call it from a block, or from whatever location you want by using the URL link.
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

5
fabou78
Re: How to add simple HTML page to XOOPS
  • 2019/11/13 17:24

  • fabou78

  • Friend of XOOPS

  • Posts: 43

  • Since: 2012/6/16


It did work, I maintained the nav-bar and the footer but my left menu are gone , not a big deal for now .

I guess if I want to maintain it all it would have to be a block, correct?

If that is the case I hope I can get to the point where I can create a simple one some day. I ll try to read the doc again.

Login

Who's Online

378 user(s) are online (283 user(s) are browsing Support Forums)


Members: 0


Guests: 378


more...

Donat-O-Meter

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

Latest GitHub Commits