xoops forums

fabou78

Friend of XOOPS
Posted on: 11/11 19:42
fabou78
fabou78 (Show more)
Friend of XOOPS
Posts: 43
Since: 2012/6/16
#1

How to add simple HTML page to XOOPS

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?

Mamba

Moderator
Posted on: 11/11 22:23
Mamba
Mamba (Show more)
Moderator
Posts: 10819
Since: 2004/4/23
#2

Re: How to add simple HTML page to XOOPS

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.

<?php
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)

<?php
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 Link</a>


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.10 | Docs | Modules | Bugs

fabou78

Friend of XOOPS
Posted on: 11/12 13:08
fabou78
fabou78 (Show more)
Friend of XOOPS
Posts: 43
Since: 2012/6/16
#3

Re: How to add simple HTML page to XOOPS

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.

Mamba

Moderator
Posted on: 11/13 0:36
Mamba
Mamba (Show more)
Moderator
Posts: 10819
Since: 2004/4/23
#4

Re: How to add simple HTML page to XOOPS

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.10 | Docs | Modules | Bugs

fabou78

Friend of XOOPS
Posted on: 11/13 17:24
fabou78
fabou78 (Show more)
Friend of XOOPS
Posts: 43
Since: 2012/6/16
#5

Re: How to add simple HTML page to XOOPS

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.